Help with .htaccess RewriteRule regex
There's a page on my website to view a user's profile. The username is passed in through the URL and since that's all that's needed in the URL I simply pass it as the query string, such as
I thought it would be nice to get rid of the question mark in the URL by using the Apache RewriteEngine, so the URL could be like this
But I am having trougble with the regular expression that RewriteRule needs. I thought I could use -
but this causes an internal server error.
Doing some testing I found that this will pass through a number the way I need it to -
so that if the URL is
What should be used instead of
could you use
RewriteRule ^profile/(.*).html$ /index.php?username=$1 [QSA,L]
That doesn't fit my specific case.
|All times are GMT +1. The time now is 09:36 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.