[英]Xampp Virtual Host for sub directory
I would like to map 我想映射
www.mydomain.com/some/url
to 至
C:/xampp/htdocs/some/dir
htaccess 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>
Hosts file 主机文件
127.0.0.1 www.mydomain.com
httpd-vhosts.conf (included in httpd.conf
) httpd-vhosts.conf (包含在
httpd.conf
)
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/someDir/"
ServerName mydomain.com/some/path
</VirtualHost>
additional info (httpd.conf) 其他信息(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 error log shows 显示500 Internal Server Error错误日志
Request exceeded the limit of 10 internal redirects due to probable configuration error.
Add the alias to your httpd.conf 将别名添加到您的httpd.conf
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
Alias /some/url C:/xampp/htdocs/some/dir
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.