I have a setup like this http://www.example.com/reroute/index.php. I would like to send all request not to index.php to index.php. So anything to /reroute/products would go to /reroute/index.php and would display http://www.example.com/reroute to the browser. It seems simple enough but every thing I have tried either tells me file doesn't exist or sends me in a loop.
Also, is it possible to set custom headers before I reroute?
Options +FollowSymLinks
IndexIgnore */*
# Turn on the RewriteEngine
RewriteEngine On
RewriteCond %{IS_SUBREQ} false
RewriteRule ^/index\.php$ http://www.example.com/reroute [R=301,L]