asp.net - Web.Config 301 Redirect -


i trying redirect specific page old domain specific page on new domain. urls following:

http://blog.mysite.com/post/2012/05/hungry.aspx

to

http://mynewsite.com/hungry.aspx

i've looked web.config file make change, following code not working:

<location path="post/2012/05/hungry.aspx">     <system.webserver>       <httpredirect enabled="true" destination="http://mynewsite.com/hungry.aspx" httpresponsestatus="permanent" />     </system.webserver>   </location> 

when visit old blog page, no redirection , remains on old blog page.

am missing something?

if http redirection enabled on old server have put new web config in folder post/2012/05/ content

<?xml version="1.0" encoding="utf-8"?> <configuration>     <system.webserver>         <httpredirect enabled="true" destination="http://mynewsite.com/" httpresponsestatus="permanent" />     </system.webserver> </configuration> 

btw. if other options fails using response.redirect code behind.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -