Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^./]+)/?$ /viewpage.php?level_one=$1&level_two=$2&level_three=$3&level_four=$4 [L]
RewriteRule ^([^/]+)/([^/]+)/([^./]+)/?$ /viewpage.php?level_one=$1&level_two=$2&level_three=$3 [L]
RewriteRule ^([^/]+)/([^./]+)/?$ /viewpage.php?level_one=$1&level_two=$2 [L]
RewriteRule ^([^./]+)/?$ /viewpage.php?level_one=$1 [L]
ErrorDocument 404 [site.net...]
What I want to do is exclude the following directories:
/admin
/images
/includes
How do I do this?
The alternative is to add a RewriteCond to each of your existing four rules to prevent each one from being applied when requests for the excluded directories are received.
As an example.of the first option, you could add:
RewriteRule ^(admin¦images¦includes)/ - [S=4]
Replace the broken pipe "¦" characters above with solid pipe characters before use; Posting on this forum modifies the pipe characters.
Jim