Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

301 htaccess to redirect broken site links

  • 29-11-2011 5:46pm
    #1
    Registered Users, Registered Users 2 Posts: 90 ✭✭


    Hi there,
    I'm just looking for the correct way to do a 301 redirect through htaccess.

    my scenario:

    I had a old site, let's call it mydomain.com. And we created a new shop. The new shop can be found at mydomain.com, but we want to direct people to mydomain.ie as default.

    There are several pages listed on Google for the old site that are now obsolete. I want to tell Google that these pages are gone and use a 301 to permanently redirect people that try to access these pages to mydomain.ie

    The code I've inserted in my htaccess file is:

    RewriteCond %{HTTP_HOST} ^mydomain.com$ [nc]
    RewriteRule ^(.*) http://www.mydomain.ie%{REQUEST_URI} [r=301,nc,l]


    This doesn't seem to work, for example, if I go to mydomain.com/old_file.html, I want this to redirect to mydomain.com, instead it gives me a 404 error as the file doesn't exist anymore.
    I've also generated and submitted a new sitemap through google webmaster tools.


    thanks


Comments

Advertisement