apache URL 二级域名重写一级域名

将 www.firefoxbug.net 重写成 firefoxbug.net
[cc lang="c"]

DocumentRoot /var/www/firefoxbug
ServerName www.firefoxbug.net
ServerAlias firefoxbug.net
ErrorLog logs/firefoxbug.net-error_log
CustomLog logs/firefoxbug.net-access_log common
RewriteEngine on
rewriteCond %{http_host} ^www.firefoxbug.net [NC]
rewriteRule ^/(.*)$ http://firefoxbug.net/$1 [R=301,L]

[/cc]

RewriteEngine   on
rewriteCond   %{http_host}   ^www.firefoxbug.net  [NC]
rewriteRule   ^/(.*)$  http://firefoxbug.net/$1  [R=301,L]

标签:Linux, Server

评论已关闭