Reputation: 1866
I've tried changing the functionality of a few rewrite conditions, but there's too many across the site I'm working on. For this one folder I'm in, I need unique funtionality, and I need to remove all existing rewrite conditions and make new ones. I've tried having just
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./item_processor.php
in the folder's htaccess, but other rewrite rules up the heirarchy seem to want to still cause redirects to our existing error pages when directed at a file that "doesn't exist" that I want managed by the item_processor.
How can I turn off pre-existing rewrite rules and have the ones in my current htaccess be the only ones to apply to the current folder?
Upvotes: 0
Views: 609
Reputation: 785256
Try this snippet in a sub-folder:
# reset ErrorDocument
ErrorDocument 404 default
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^ item_processor.php [L]
Upvotes: 1