索引:
IIS6.0设置301重定向
IIS7.5设置301重定向
Apache设置301重定向
Nginx设置301重定向
IIS6.0设置301重定向
IIS7.5设置301重定向
下面是一个IIS7.5通过web.config文件进行301重定向的设置实例。
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="301-landui.com" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^landui.com$" /> </conditions> <action type="Redirect" url="http://www.landui.com/{R:0}" redirectType="Permanent" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
landui.com重定向到www.landui.com
主要注意
Apache设置301重定向
DA面板主机管理使用的301重定向
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^fi7.cn RewriteRule ^(.*)$ http://www.fi7.cn/$1 [R=permanent,L] </IfModule> # END WordPress
Nginx设置301重定向
Tomcat设置301重定向