Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I need to redirect URL to another server, how can i access the server and include it in my code so that response.redirect recognizes it?
At the moment i am using host name IP sitting on the different server in my host file to access it, but thats on local.
Is there a way that i could redirect to this server?

Regards
Posted
Updated 28-Jan-11 4:55am
v2

you can use Server.Transfer. CP won't let me post without saying more, but it's really that simple.

You should also consider tagging your questions properly. This is plainly an ASP.NET question.
 
Share this answer
 
v2
Comments
Yusuf 28-Jan-11 10:53am    
CP won't let me post without saying more ?

huh?
How would i access that server, let say you want to redirect to google.co.uk, how would you do that?
 
Share this answer
 
Your question is not clear

you can use Response.Redirect(url) or Server.Transfer(url). You don't need to access the server you are redirecting/transferring to. Please understand that there is a difference between <a href="http://msdn.microsoft.com/en-us/library/a8wa7sdt(v=vs.80).aspx">redirect</a>[<a href="http://msdn.microsoft.com/en-us/library/a8wa7sdt(v=vs.80).aspx" target="_blank" title="New Window">^</a>] and <a href="http://msdn.microsoft.com/en-us/library/system.web.httpserverutility.transfer.aspx">transfer</a>[<a href="http://msdn.microsoft.com/en-us/library/system.web.httpserverutility.transfer.aspx" target="_blank" title="New Window">^</a>].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900