开发者

htaccess : make directories exceptions from auto_prepend?

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开发者_如何学Python/views/components/doc_head.php


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.


php_value auto_prepend_file none


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜