Apache: Change XAMPP/PHP handle from application/x-httpd-php to application/x-httpd-php5

半腔热情 提交于 2019-12-06 01:23:52

Not really an answer to your question, but I wouldn't do this to myself. Apache's config file format isn't really built for stuff like this.

To me, having two separate htaccess files (like .htaccess and .htaccess.local, and controlling the local server through the AccessFileName directive:

AccessFileName .htaccess.local

is the best way to go.

If you really want to have everything in one file, it may be possible by using <IfDefine> blocks to separate local and live directives. You would have to set a define when starting your server locally, and could then test for the presence or non-presence of that define.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!