I have a problem with the following Rules. The following rules working like
www.address.com/profile/username
but when i write after the username ( .com ) like this
www.address.com/profile/username.com
then i am getting internal server error. How can i fix this problem anyone can help me here please ?
RewriteRule ^profile/([\w-]+)/?$ profile.php?username=$1 [L,QSA]
RewriteRule ^profile/(followers|friends|saved)/([\w-]+)/?$ $1.php?username=$2 [L,QSA]
You may make your regex more open like these rules:
RewriteRule ^profile/([^/]+)/?$ profile.php?username=$1 [L,QSA,NC]
RewriteRule ^profile/(followers|friends|saved)/([^/]+)/?$ $1.php?username=$2 [L,QSA,NC]
[^/]
matches any character that is not /
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.