【发布时间】:2014-06-09 17:32:40
【问题描述】:
问题
我想要地图
www.mydomain.com/some/url
到
C:/xampp/htdocs/some/dir
我有什么
- Xampp
- WordPress
htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /some/path/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /some/path/index.php [L]
</IfModule>
主机文件
127.0.0.1 www.mydomain.com
httpd-vhosts.conf(包含在httpd.conf中)
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/someDir/"
ServerName mydomain.com/some/path
</VirtualHost>
附加信息 (httpd.conf)
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
目前的成果
500 Internal Server Error 错误日志显示
Request exceeded the limit of 10 internal redirects due to probable configuration error.
【问题讨论】:
-
ServerName mydomain.com/some/path必须改为ServerName mydomain.com。你应该添加ServerAlias www.mydomain.com也许。 -
Require all granted是什么意思? -
还有,最重要的是:您的问题是什么?
-
Require all granted是 xampp 中目录指令的默认设置(对于文档 Root,afaik)。我在这里有点措手不及,但我认为它可以最大限度地提高访问权限。如果附加的 httpd.conf 设置与问题无关,我将删除它们以清理我的请求。我的问题是:这些设置是否是获得所需结果所需的一切,我认为它们不是,如果不是:“我错过了什么?” -
您在描述中遗漏了最重要的细节:问题是什么?什么不起作用?如果您请求域会发生什么?日志文件显示什么?浏览器显示什么?
标签: php apache xampp virtualhost httpd.conf