Page 1 of 1

.htaccess help

Posted: Mon Jul 11, 2011 10:32 am
by Pazuzu156
I'm using a .htaccess to rewrite paths to make my urls look cleaner. And for the users it will be /members/username but my thing is members.php?uid=username

For the file I'm using:

Code: Select all

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule members/$1 members.php?uid=$1
But i get redirected to my 404 error page. How would I do this?

Re: .htaccess help

Posted: Mon Jul 11, 2011 11:38 am
by flying_circus
Something about it looks wrong, but I cant test it right now.
The first thing I would try would be to replace the first $1 with (.*)
Pazuzu156 wrote:

Code: Select all

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule members/(.*) members.php?uid=$1