Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have rebuilt a website which was all created with static html pages, it has now been rebuilt using a CMS system.

I need to find a way of redirecting all the existing links to there new corresponding pages which utilise friendly URL rewrites on the CMS based website

I imagine there will be several hundred if not 1000s as i have pages and images linked from google.

What is the most efficient way to complete this

Thanks in advance

Mike

share|improve this question
1  
Are there any similarities between the old URLs and the new ones? –  Nick Sep 7 '12 at 10:19
add comment

2 Answers 2

I've been working on a similar problem this week, a website I've taken over has 4,000+ broken links because the site was migrated away from an old CMS, so all the URL's are different.

The only way I've managed to solve the problem is by adding a fair number of new Redirect rules to my .htaccess file. What you will find is that a lot of your old links can be grouped together and directed to one section of your site. So for example, instead of writing rules to deal with links like:

  • http://www.mydomain.com/news_article/01
  • http://www.mydomain.com/news_article/02

Also

Redirect permanent /news_article/01 http://www.mydomain.com/news/01/
Redirect permanent /news_article/02 http://www.mydomain.com/news/02/

You would instead divert these URL's like this:

Redirect permanent /news_article http://www.mydomain.com/news/

So essentially everything contained inside the /news_article folder would direct to the /news/ folder of the new site.

It's not a glamorous fix, but either way you are faced with a long drawn out process of redirects.

share|improve this answer
add comment

What an interesting problem - I think you have a few options.

  • Consider if you want this automated or letting users click through manually.
    • If manual then you can write a program which will update all your HTML pages to enter the new code - not ideal, I've done this in the past and it was a little hassle but not too bad.
    • If automatic, you could also add an iFrame to your HTML pages and then use some javascript to forward it all (http://stackoverflow.com/questions/580669/redirect-parent-window-from-an-iframe-action-using-javascript).

The above suggestions works if you're happy to send users to your new page home page - to send to the equivalent of the HTML page is more tricky.

Lose the SEO, remove the pages and let the new pages get indexed (totally not recommended). However, this may work but depends on the language you're using. For example, in ASP.NET you can set up what to do if you get a page not found. You then have a list of your 'old' HTML pages and link to your new versions.

I hope something here helps.

share|improve this answer
add comment

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.