views:

24

answers:

2

Is there a way to make my auto_prepend command ignore my includes/ and ajax/ directories?

I can write regular expressions easily it's just knowing how to markup the conditional statements...

# choose which files are mother files (aka not includes or ajax)
# add dochead to these files
{some kind of regex conditioon here }
php_value auto_prepend_file  C:/wamp/www/new_glaven_valley/views/components/doc_head.php
A: 

Why not just stick .htaccess files in your includes/ and ajax/ directories that unset auto_prepend_file (or if that can't be done, you could always have those directories auto_prepend an empty file.

timdev
that sounds wicked, how do i unset an auto_prepend anyone please?thanks!
Haroldo
+1  A: 

Yes - use LocationMathc or directoryMatch but my prefrence would be to use a stub file as the auto-prepend and select further includes based on the value of $_SERVER['REQUEST_URI'] in my php code - its a lot easier to describe complicated structures and relationships using a procedural language than a config file - and you don't need to reset your webserver every time you want to change / save the settings.

C.

symcbean