954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

301 redirect using web.config

I'm trying to redirect about 40 web addresses from an old site to a new site. I was able to redirect all of the pages that DO NOT have a ".aspx" in them to the new site using .htaccess but I cannot figure out how to redirect the .aspx links. I was told I need to do it in the web.config file.

Can someone please help?

I moved a site from www.handstands.com to www.randombuy.com .

Here is an example of a link that works using .htaccess and one that does not.

Works: http://www.handstands.com/info/About_Us

Doesn't work: http://www.handstands.com/p-294-keuken-5-piece-ceramic-knife-set-with-bamboo-block.aspx (should go to: http://www.randombuy.com/p-294-keuken-5-piece-ceramic-knife-set-with-bamboo-block.aspx )

Any help would be appreciated.

Thank you,
Darrin Keller

darrinkeller
Newbie Poster
4 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 
Ramesh S
Posting Pro
583 posts since Jun 2009
Reputation Points: 165
Solved Threads: 113
 

Hi,

Hope the following links will help you.

How do I use .htaccess to redirect an aspx page to a php page? Redirect any page that has an .aspx ending to a new url.

Thank you for these links. However, I checked into them and I don't think they tell me what needs to be done. I am redirecting from an .aspx to an .aspx but I'm using a PHP server to do the forwarding... I have multiple individual URLs that I wanted to redirect.

Do you have any other ideas?

Thanks,
Darrin Keller

darrinkeller
Newbie Poster
4 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

you need to write URL rewrite in web.config file. It will fix your problem.

crishlay
Junior Poster
132 posts since May 2010
Reputation Points: 10
Solved Threads: 16
 
you need to write URL rewrite in web.config file. It will fix your problem.


Thanks but I don't know how to do that. I thought that if I could figure out a way to forward all .aspx to the new website, it would work. But in the interim, I figured out how to forward all error messages to the new site so it effectively works the same way.

darrinkeller
Newbie Poster
4 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

Does anyone have any suggestions on how to set this up?

Thanks!
Darrin

darrinkeller
Newbie Poster
4 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: