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] 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 Link to comment https://forums.phpfreaks.com/topic/190357-rewritecondrule-problem/#findComment-1004244 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.