Forum Moderators: phranque
RewriteOptions inherit or RewriteOptions none can be used to enable or disable (respectively) this behaviour for mod_rewrite directives only.
In general, if you find that all subdirectories of a directory in which you have .htaccess code need to be exempted from all or most of that code, then it is often simpler to re-arrange your directory structure so that those subdirectories no longer fall under the directory containing the code which you do not wish to apply to them.
With mod_rewrite rules specifically, you can write the rules so that they do not apply to the subdirectories of the current directory, but most other modules' directives do not support this kind of conditional execution.
Jim
say i had a folder name "article" as [abc.com...]
Now in that folder i m keeping this rule.
RewriteRule ^(index¦rss¦redirect¦texvc)\.php$ - [L]
RewriteRule ^(.*)$ index.php?id=$1 [L,QSA]
so if someone access like [abc.com...] it will go as index.php?id=planning_loan
Now there are some other files also like index.php, rss.php etc which i dodnt want to apply this rule. so i had kept rule 1 above for them.
Now what happens there are also some sub-folders under the "article" folder say admin,css,data etc.
now on those folder, there also some php files. so when some access like [abc.com...] it will go as index.php?id=login which I DODNT want.
So is there any way to stop applying this rules to sub folders.
OR can i write this rules in some other way?
Thanks in advance.
RewriteCond $1 !^(index¦rss¦redirect¦texvc)\.php$
RewriteCond $1 !/.
RewriteRule (.*) index.php?id=$1 [L,QSA]
Jim