如何设置.htaccess文件使二级域名跳转到顶级域名?

2025-05-15 17:50:44
推荐回答(1个)
回答1:


deny from all

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(blog\.abc\.com)(:80)? [NC]
RewriteRule ^(.*) http://abc.com/$1 [R=301,L]
order deny,allow