<VirtualHost *:80> DirectoryIndex index.php ServerName lastme.com RewriteEngine on RewriteCond %{HTTP_HOST} ^lastme.com [nc] RewriteRule ^(.*)$ http://www.lastme.com.com/$1 [r=301,nc] </VirtualHost>
nginx & wordpress 配置重写来做伪静态,每个域名单独放到一个server文件中,在nginx.conf中包含进去,这样有利于配置管理.
me@localhost /# cat /webserver/nginx/vhost/lastme.conf
1.在需要配置伪静态的server配置文件中,配置如下...