我最近实现了白色标签,在更改我的VHOSTS设置后,我发现一些URL被剥离,例如:
<VirtualHost *:8166>
ServerAdmin webmaster@localhost
DocumentRoot C:\xampp5.2test\htdocs\portal
ServerName xampp
<Directory "C:\xampp5.2test\htdocs\portal">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>在apache vhosts中是这样配置的。但是,当用户在地址栏中写入localhost:8166时:
http://localhost:8166/ url是这样的,而不是
http://localhost:8166/portal
像上面一样,我怎样才能让它将完整的路径附加到url
谢谢。
发布于 2011-12-22 22:45:43
根据您的解释,只需更改文档根目录即可:
<VirtualHost *:8166>
ServerAdmin webmaster@localhost
DocumentRoot C:\xampp5.2test\htdocs
ServerName xampp
RewriteEngine On
RewriteRule ^/*$ /portal
<Directory "C:\xampp5.2test\htdocs\portal">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>https://stackoverflow.com/questions/8605431
复制相似问题