Jump to content

RewriteCond/Rule problem


Allan-

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.