贝赛科技模板网年会员办理优惠中

您当前的位置:首页>CMS教程>AspCms教程

列表页左上角广告300*250
扫一扫,有好礼

aspcms虚拟主机上怎么设置全站301重定向

来源:本站 发布时间:2021-01-13 10:18:53热度:121 ℃

aspcms虚拟主机上怎么设置全站301重定向

问题:今天遇到一个aspcms网站,阿里云虚拟主机,无法实现全站301,该如何设置?阿里云虚拟主机本身做301重定向就很鸡肋。先是度娘了一遍,有说改AspCms_Config文件的,有说改index.asp的,总之不清晰不明了。这里提供下规则文件送给有需要的朋友


方法一:

<rewrite>

<rules>

<rule name="WWW Redirect" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^shal88.com$" />

</conditions>

<action type="Redirect" url="http://www.shal88.com/{R:0}" redirectType="Permanent" />

</rule>

</rules>

</rewrite>


方法二:

<rewrite>

<rules>

<rule name="WWW Redirect" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^shal88.com$" />

</conditions>

<action type="Redirect" url="https://www.shal88.com/{R:0}" redirectType="Permanent" />

</rule>

</rules>

</rewrite>


文件提供者:晨星傲月https://www.xundang.com/

转载请注明来源网址:https://jsexam.cn/aspcmsjc/115.html