Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm redeveloping a site for a client.

Their current site is written in .asp. I've rebuilt in WordPress as they need a CMS.

We're repointing the DNS to our hosting environment.

My question is - I need to set up an .htaccess file (I think this is the best way) to redirect all the old URLs to their new equivalent. Some of the URL structures have changed so it's not just a case of changing .asp > .php. Soo... where should I upload the .htaccess file - does this need to go in the root directory OR does it need to go in my wp-theme folder?

Thanks

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can just add the .htaccess to the root of the website however be cautious as WordPress will have added it's own if you have changed the link slug structure within the WordPress admin.

In the htaccess file you should use 301 re-direction's like so:

redirect 301 /oldpage.asp http://www.thesite.com/newpage/

If it is a big site then you will not want to re-direct all pages although it could be worth while. I normally just do a Google site: search and re-direct the most important pages and any with first or second page listings.

share|improve this answer
    
Hiya - thanks for the reply. There are only 6 pages on the old site so it's quite manageable. I've checked and wp has created an .htacess file - can i just add my redirects after the wp code? –  V Neal Aug 17 '12 at 9:30
    
Yeah that should be fine, but obviously make sure you test it thoroughly! –  FrontEndJohn Aug 17 '12 at 9:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.