开发者

asp.net,web forms,about url task

开发者 https://www.devze.com 2023-01-24 22:18 出处:网络
i have my project 开发者_开发知识库whose name is let us take \"xyz\",it is a live project is there on the website,problem is that

i have my project 开发者_开发知识库whose name is let us take "xyz",it is a live project is there on the website,problem is that

when i write "xyz" on any browser url place and i will click enter not ctlr+enter then it has to redirect to "http://www.xyz.com".in a programatic way i am using .net 2.0 and iis server for my project.so please tell me the solution for that

2nd problem is that in the same url when i write "xyz.com"then enter it is going to the page but it is displaying as "http://xyz.com" instead of http://www.xyz.com"

so please tell me if u have any answer to this problem in .net 2.0 and iis server


For the first part of your question, this is not possible. You cannot control where a browser will send "xyz" There are many factors including a person's ISP that would determine where the request for "xyz" would be sent.

For the second part of your question, I would suggest setting up a redirect in IIS to forward all requests form xyz.com to www.xyz.com See http://technet.microsoft.com/en-us/library/cc732969%28WS.10%29.aspx for info on how to do that.

0

精彩评论

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

关注公众号