2016-10-01 134 views
0

我的网站是http://tebim.ir重定向301永久重定向不发送url参数

我决定创建一个新的域,并在那里移动我的网站,而不会失去我的谷歌排名。谷歌更改地址工具告诉我做301重定向到我的新域名,我这样做。

现在重定向工作正常,但我的网址参数(查询字符串)不会与重定向一起发送。

例如浏览www.old-domain.com/view.aspx?id=5047重定向到www.new-domain.com/view.aspx。

?id = 5047被删除。

**我使用WebSitePanel CPanel重定向我的网站。这里是重定向表格的图片:

enter image description here 有什么不对?谢谢。

回答

0

你需要使用URL重写

<rule name="behdoctor" stopProcessing="true"> 
     <match url="tebim.ir$" /> 
     <conditions> 
     <add input="{QUERY_STRING}" pattern="Id=5047" /> 
    </conditions> 
     <action type="Redirect" url="http://www.newdomain.com" redirectType="Permanent" /> 
    </rule> 

对于更多信息检查this链接

+0

我应该在哪里写的吗?项目是asp.net webforms。 –

+0

@ Ali.Rashidi在Web配置 – Webruster

+0

谢谢,但它没有奏效。不发生重定向。 –