Forum Moderators: phranque

Message Too Old, No Replies

auto prepend file problem in htaccess

         

asifmulla

10:33 am on Apr 22, 2009 (gmt 0)

10+ Year Member



Hi,

I want to prepend file automatically for every request that the apache serve.For that reason i have added followinf directive in htaccess file.

php_value auto_prepend_file C:/xampp/htdocs/login.php

Its working fine but now i don't want this file to be prepended for every file request. For that i have added one more directive as follows:

RewriteCond %{REQUEST_FILENAME} !test\.php
php_value auto_prepend_file C:/xampp/htdocs/login.php

But it doesn't seem to work. For test.php also it is prepending login.php file.

Can anybody tell me how to escape certain files by this rule?

g1smd

7:37 pm on Apr 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can't use a RewriteCond with something that isn't a RewriteRule.

Look at the manual and see if can be used with the <files>, or some other similar container.

Alternatively, edit the login script so that it only runs for certain requested URLs and aborts immediately for other requests.