Northern Flame Posted April 1, 2008 Share Posted April 1, 2008 i am creating a membership program and the user profiles will be like myspace, http://www.mysite.com/username i know how to do that, but i want to make exceptions to this, because it messes with the directories. because if i have the directory members and a user signs up as members his URL will be http://www.mysite.com/members but when i try to run http://www.mysite.com/members/ it will not work unless i have the "index.php" added to the URL, how can i make exceptions in the htaccess code? heres my code: RewriteEngine on RewriteRule ^([^/\.]+)/?$ members/profile.php?user=$1 [L] so what i want to do is not run the code above if "user" equals certain things such as members, images, templates, etc. Quote Link to comment Share on other sites More sharing options...
trq Posted April 1, 2008 Share Posted April 1, 2008 Add these conditions prior to your rule. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted April 2, 2008 Author Share Posted April 2, 2008 do i add both lines for each sub-directory? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.