.htaccess: RewriteCond syntax?
Posted
by Rosarch
on Stack Overflow
See other posts from Stack Overflow
or by Rosarch
Published on 2010-04-21T16:00:09Z
Indexed on
2010/04/21
16:03 UTC
Read the original article
Hit count: 159
I'm using Drupal 6. Typically, when the user requests a URL for which Drupal has no response, it uses index.php as the error document. However, I'd like to suspend this behavior for a specific URL. How can I do this?
RewriteCond %{REQUEST_FILENAME} !=fail
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Where "fail" is the path I want to block. So www.example.com/fail should result in a 404.
Incidentally, what does [L, QSA]
do? I've looked at documentation without luck.
© Stack Overflow or respective owner