Click to See Complete Forum and Search --> : RewriteRule question


AndreF
07-06-2008, 02:34 PM
I want to run blah.php via htaccess that it runs everywhere when any page loads.
I searched lots of documents and I see they are using regular expression to pass values to php files to make a seo friendly link. But I don't need to pass any values to my php, I want to simply run blah.php via my .htaccess. Please simply tell me how the htaccess command should look like?

Horizon88
07-07-2008, 03:20 AM
Offhand,

RewriteRule ^.*$ blah.php [L]

May work. That *could* probably result in an infinite redirect, but I dunno for sure. Give it a shot and post back if it doesn't work. :D

AndreF
07-07-2008, 03:59 AM
Yes, that is infinite redirect. If I request index.php or whatever I want to run blah.php first then after the code ends then index.php or the requested page should run. with that infinite redirect only blah.php runs and when it ends then index.php won't run. please investiage and advice further.

bradgrafelman
07-09-2008, 07:19 PM
php_value auto_prepend_file "/path/to/blah.php"