【发布时间】:2015-10-08 17:36:06
【问题描述】:
我无法让 php_value include_path 使用 XAMPP。似乎它应该是一个容易解决的问题,但已经搜索和尝试了几个小时。
修改 Apache 的/XAMPP 的 httpd.cfg 中的根目录就像一个魅力,但尝试在 .htaccess 文件中做同样的事情根本不会。这是我完整的.htaccess 文件(除此方面外一切正常):
Options +FollowSymLinks -MultiViews
rewriteEngine on
RewriteBase /
## Hide .php extension by external redirection:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,NC]
## Internally redirect to .php extension:
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php
RewriteCond %{REQUEST_URI} !^/products/.*$
## Redirect to index when page is missing.
ErrorDocument 404 http://www.xxxxx.xxx
php_value include_path ".:D:/Applications/XAMPP/htdocs/project1"
我尝试了无穷无尽的变化:
".:D:\Applications\XAMPP\htdocs\project1"
.:D:/Applications/XAMPP/htdocs/project1
".:/project1"
还有这个的所有变体。我根本想不通。大家有什么建议吗?
【问题讨论】:
标签: php apache .htaccess http-redirect