开发者

301 redirect problem in ASP.NET

I am developed web site with .NET,now i want to implement 301 redirect(non www to www).I have used theis code

RewriteEngine On    
RewriteCond %{HTTP_HOST} ^xxx.com [NC]    
RewriteRule ^(.*)$ http://www.xxx.com/$1 [L,R=301]

But i didn't redirect with www. I have used following settings in File Zilla.

My site port NO:10021

Protocal:FTP

Encryption:Require explicity FTP over TLS

开发者_如何学JAVAThanks in advance.


That's an .htaccess file which is for Apache servers. See this blog post for URL writing with .Net.


If you are doing URL Routing.. I wrote this article to do it in .Net 4.0... If you are wanting to do a 301 Permanent Change... At the end of this article you will see how to do it in .Net 4.0. Otherwise you have to put a page out there and do a Response.Redirect (which does not update Search Engines - The new 4.0 method does).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜