- Code: Select all
RewriteRule ^profile/(.*).html profile.php?u=$1
how to allow user have space between user name...
if the user name "hello world" and the url display like this
- Code: Select all
http://www.mydomain.com/profile/hell-world.html
RewriteRule ^profile/(.*).html profile.php?u=$1
http://www.mydomain.com/profile/hell-world.html
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^profile/([^/]+)\.html$ /profile.php?u=$1 [QSA,L]
i got an error like thisRewriteRule ^profile/([0-9]+)/([_A-Za-z0-9-]+).html profile.php?u=$1 [L]
Multiple Choices
The document name you requested (/profile/hello-world.html) could not be found on this server. However, we found documents with names similar to the one you requested.
Available documents:
/profile.php/hello-world.html (common basename)
http://www.mydomain.com/profile/hello-world.html
RewriteRule ^profile/([0-9]+)/([_A-Za-z0-9-]+).html profile.php?u=$1 [L]
RewriteRule ^profile/([0-9]+)/([_A-Za-z0-9-]+).html [L]
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^profile/([0-9]+)/[^/]+\.html$ /profile.php?u=$1 [QSA,L]
Return to Friendly URLs with Mod_Rewrite
Users browsing this forum: No registered users and 48 guests