[p=25, null, left][color=rgb(51, 51, 51)]一、伪静态规则为.htaccess的操作方法:[/p][p=25, null, left][color=rgb(51, 51, 51)]打开.htaccess文件,将以下代码加进去,里面的caogen8.co(即红色部分)要改成你自己的域名[/p][p=25, null, left][color=rgb(51, 51, 51)]RewriteEngine On[/p][p=25, null, left][color=rgb(51, 51, 51)]RewriteCond %{HTTP_HOST} !^www.cgzz8.cn$ [NC][/p][p=25, null, left][color=rgb(51, 51, 51)]RewriteRule ^(.*)$ https://www.cgzz8.cn/$1 [L,R=301][/p]
[p=25, null, left][color=rgb(51, 51, 51)]二、伪静态规则是web.config的操作方法:[/p][p=25, null, left][color=rgb(51, 51, 51)]打开web.config,在<rules> 和 </rules> 之间插件以下代码,里面的caogen8.co(两处)要改成你自己的域名
[/p][p=25, null, left][color=rgb(51, 51, 51)]<rule name="WWW Redirect" stopProcessing="true">[/p][p=25, null, left][color=rgb(51, 51, 51)]<match url=".*" />[/p][p=25, null, left][color=rgb(51, 51, 51)]<conditions>[/p][p=25, null, left][color=rgb(51, 51, 51)]<add input="{HTTP_HOST}" pattern="^caogen8.co$" />[/p][p=25, null, left][color=rgb(51, 51, 51)]</conditions>[/p][p=25, null, left][color=rgb(51, 51, 51)]<action type="Redirect" url="https://www.cgzz8.cn/{R:0}" redirectType="Permanent" /> [/p][p=25, null, left][color=rgb(51, 51, 51)]</rule>[/p]
[p=25, null, left][color=rgb(51, 51, 51)]三、主机环境是Nginx的,将以下代码填进自定义的伪静态规则里,将其中的yj99.cn网址(两处)改为你自己的[/p][p=25, null, left][color=rgb(51, 51, 51)]if ($host = 'caogen8.co' ) {[/p][p=25, null, left][color=rgb(51, 51, 51)]rewrite ^/(.*)$ https://www.cgzz8.cn/$1 permanent;[/p][p=25, null, left][color=rgb(51, 51, 51)]}[/p]