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://abcmuban.com/aspcmsjc/115.html