APMServ 5.2.6 虚拟主机的伪静态配置

来源:互联网 发布:js定时刷新页面 编辑:程序博客网 时间:2024/05/17 20:40
位置:/APMServ5.2.6/Apache/conf/apmserv/vhost.conf
需要先在虚拟主机中添加此虚拟主机(www.xx.com),添加虚拟主机时不要忘记在host中增加重定向域名www.xx.com,然后在vhost.conf文件中增加伪静态的配置
样例:
<VirtualHost *:80>
 ServerName www.xx.com
 ServerAlias *.xx.com
 DocumentRoot "D:/server/httpd/htdocs/xx"
<Directory "D:/server/httpd/htdocs/xx">
 Options All ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
 DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.shtml index.aspx default.aspx  
 AllowOverride None
 Order Deny,Allow
 Allow from all
 php_admin_value open_basedir "D:/server/httpd/htdocs/xx/;D:/APMServ5.2.6/tmp/uploadtemp/;D:\APMServ5.2.6\tmp\sessiondata"
 #RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
 #RewriteRule .* - [F]
 php_admin_value safe_mode On
</Directory>
<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteRule ^(.*)content-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/index\.php\?m=content&c=index&a=show&catid=$2&id=$3&page=$4
 RewriteRule ^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/index\.php\?m=content&c=index&a=show&catid=$2&id=$3&page=$4
 RewriteRule ^(.*)list-([0-9]+)-([0-9]+).html$ $1/index\.php\?m=content&c=index&a=lists&catid=$2&page=$3
 ErrorDocument 404 /error.html
</IfModule>
</VirtualHost>
0 0
原创粉丝点击