位置:/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
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>