ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Just launched an EE site - options for remapping old site urls to new site, to prevent 404s on old links

August 06, 2008 6:38am

Subscribe [2]
  • #1 / Aug 06, 2008 6:38am

    Meirion

    127 posts

    Hi there,

    I’ve just launched an EE site, which is working wonderfully. However, there are a good number of incomming links from external sites which now don’t work, due to the old site being ASP based.

    These links are in the format: http://www.sundialgroup.com/woodside/conference.asp
    And they end up with an error page saying

    This domain is not configured for this service. Please contact the webmaster to have it enabled.

    What are my options for ‘catching’ these pages and redirecting them to the corresponding new page on the website, or if not to a generic “We’ve updated our website” style page?

    Thanks,

    Meirion

  • #2 / Aug 06, 2008 10:45am

    Ryan Irelan

    444 posts

    You’ll want to use some 301 redirects, set up in the .htaccess file. Something like this:

    RewriteRule ^/old_page/something.asp /new_page/on_expressionengine [L,R=301]

    Search the forum and Google for “301 Redirects” and there are a ton of resources to get you started. Let me know if you need more help, I’d be glad to take a look at what you’re doing.

  • #3 / Aug 06, 2008 11:13am

    Meirion

    127 posts

    Thanks Ryan

    I’ve used Google Webmaster tools to find all the pages on the old site with incoming external links (88 pages). I’ll make a rule for each of these pages manually and then stick those rewrite rules in the .htaccess. That won’t have a hit on site performance will it?

    Also, I am using urls such as http://www.sundialgroup.com/contact_us/ which shows the template site/contact (site is the default template group). I believe this is because I don’t have a 404 template set.

    Now I’m happy with this behaviour, but what it does mean is that you can go to any made up url http://www.sundialgroup.com/madeupurl/nopagehere/ and you will be served the frontpage content. Can I stop this from happening?

  • #4 / Aug 06, 2008 11:28am

    Ryan Irelan

    444 posts

    Thanks Ryan

    I’ve used Google Webmaster tools to find all the pages on the old site with incoming external links (88 pages). I’ll make a rule for each of these pages manually and then stick those rewrite rules in the .htaccess. That won’t have a hit on site performance will it?

    If I remember correctly, Apache loads the .htaccess file on every request, so if you have a huge list of redirects, it could definitely have an impact. I don’t think 88 rules would be anything noticeable, but it definitely could have an impact.

  • #5 / Aug 06, 2008 11:31am

    Ryan Irelan

    444 posts

    Also, I am using urls such as http://www.sundialgroup.com/contact_us/ which shows the template site/contact (site is the default template group). I believe this is because I don’t have a 404 template set.

    Now I’m happy with this behaviour, but what it does mean is that you can go to any made up url http://www.sundialgroup.com/madeupurl/nopagehere/ and you will be served the frontpage content. Can I stop this from happening?

    You probably need to set up a 404 Page in Global Template Preferences.

  • #6 / Aug 06, 2008 11:52am

    Meirion

    127 posts

    However, does that not mean that http://www.sundialgroup.com/contact_us/ will not work any more, and I will have to use http://www.sundialgroup.com/site/contact_us/ ?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases