开发者

Using .htaccess with FastCGI

开发者 https://www.devze.com 2023-01-24 08:50 出处:网络
I\'ve reade开发者_如何学Pythond that when using FastCGI to run PHP the .htaccess file included into the main directory of my site is ignored (right now i have the .htaccess file located in /var/www/vh

I've reade开发者_如何学Pythond that when using FastCGI to run PHP the .htaccess file included into the main directory of my site is ignored (right now i have the .htaccess file located in /var/www/vhosts/mydomain.com/httpdocs) My question is how can i apply the directives and flags currently on .htaccess to this domain only? can i have an httpd.conf only for this domain? where should i put the current .htaccess content to keep the same settings working?

many thanks in advance,


Apache will read .htaccess files as long as AllowOverride is enabled in httpd.conf. What you cannot do is put PHP directives inside .htaccess: this works only with PHP installed as an Apache module and would cause a 500 Server error with PHP installed as either CGI or FastCGI.

Some configurations (with suphp and similar) allow for a per-directory php.ini with local settings. If this doesn't work with your setup you can change php.ini settings only with a series of ini_set() instructions (in an included file, most often)

0

精彩评论

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

关注公众号