在httpd.conf中手工设置。
示例:将http://127.0.0.1/跳转到http://127.0.0.1/phpinfo.php
#APMServ默认虚拟主机
NameVirtualHost *:80
<VirtualHost *:80>
ServerName *
DocumentRoot "D:/APMServ5.2.6/www/htdocs"
RewriteEngine On
RewriteRule ^/$ /phpinfo.php [R=301]
<Directory "D:/APMServ5.2.6/www/htdocs">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
时间: 2024-09-12 22:24:03