Sun*_*Red 1 php apache xampp virtualhost httpd.conf
我想要地图
www.mydomain.com/some/url
Run Code Online (Sandbox Code Playgroud)
至
C:/xampp/htdocs/some/dir
Run Code Online (Sandbox Code Playgroud)
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>
Run Code Online (Sandbox Code Playgroud)
主机文件
127.0.0.1 www.mydomain.com
Run Code Online (Sandbox Code Playgroud)
httpd-vhosts.conf(包含在内httpd.conf)
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/someDir/"
ServerName mydomain.com/some/path
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
附加信息(httpd.conf)
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)
显示500内部服务器错误错误日志
Request exceeded the limit of 10 internal redirects due to probable configuration error.
Run Code Online (Sandbox Code Playgroud)
小智 5
将别名添加到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
Run Code Online (Sandbox Code Playgroud)