Allan- Posted January 30, 2010 Share Posted January 30, 2010 When I want to access www.mysite.com/ntn/ then the first code works, but the second doesn't. What I do wrong? Trying first time to use mod_rewrite. Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_URI} !^/?ntn/ RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?id=$1 [NC,L] Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_URI} !^/?ntn/ RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?id=$1/$2 [NC,L] RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?id=$1 [NC,L] Quote Link to comment https://forums.phpfreaks.com/topic/190357-rewritecondrule-problem/ Share on other sites More sharing options...
wildteen88 Posted January 30, 2010 Share Posted January 30, 2010 You should use the following conditions instead RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f Quote Link to comment https://forums.phpfreaks.com/topic/190357-rewritecondrule-problem/#findComment-1004244 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.