Grow your CSS skills. Land your dream job.

.htaccess and old page direction question

  • # October 2, 2012 at 3:49 pm

    Hey I was wondering if this is the best way to go about this if anyone has had experience in this area.

    Scenario – a client of mine bought a domain from someone else. New website is built and most pages remained the same, however we’re seeing 8 or 9 links remaining that are still showing up as 404 errors.

    My first thought was to use htaccess to 301 direct them. I’m definitely not an .htaccess guru so I was looking at the code snippets. Would we just use what’s there for the 9 links?

    Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
    Redirect 301 /oldpage2.html http://www.yoursite.com/folder/

    Or something more like this to redirect everything??

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.oldsite.com$ [NC]
    RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".