#1
  1. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Oct 2011
    Posts
    27
    Rep Power
    0

    301 redirect help needed please


    I have recently combined two websites with different domain names and different url structures. I am trying to do a 301 redirect from one site to the other to redirect from every page on the site to its equivalent on the other site. The 301 redirect I did for the homepage has worked however none of the redirects for other pages are working and I was hoping that someone could tell me where I have gone wrong.
    HOMEPAGE:
    REDIRECT 301 / http://www.newdomain.com
    This one works.

    REDIRECT 301 /Opal-Jewellery.html http://www.newdomain.com/Opal-Jewelry-s/1877.htm
    This one doesn't work and returns a result saying "Firefox can't find the server at www.newdomain.comopal-jewellery.html." which obviously is the new domain name but with the old domain extension not the new one I'm asking it to redirect to so it seems its redirecting only the domain itself and not the extension.

    Please could someone tell me what I've done wrong with this redirect?
  2. #2
  3. SEO Insultant
    SEO Chat Mastermind (5000+ posts)

    Join Date
    Oct 2005
    Location
    sharing a room with my ego
    Posts
    5,747
    Rep Power
    1793
    The Redirect command only does complete websites or structures. It attaches the URL found at the original address to the target address.

    If you want to perform a page-by-page redirect with some fancy formatting, you'll have to use mod_rewrite instead. It's quite complicated, depending on what you want to achieve. See also:
    .htaccess tips
  4. #3
  5. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Oct 2011
    Posts
    27
    Rep Power
    0
    Thank you for your reply.
    So its not possible to redirect one website into another this way if the url structure is different?

    Is there anyone reading this who could write this mod_rewrite code for me if I provide the old/new urls? I'd rather pay someone who knows what they are doing to produce this if its complicated as my site is currently redirecting to nothing and I'd like it fixed asap.
  6. #4
  7. SEO Insultant
    SEO Chat Mastermind (5000+ posts)

    Join Date
    Oct 2005
    Location
    sharing a room with my ego
    Posts
    5,747
    Rep Power
    1793
    You can do this using a series of Rewritecond and Rewriterule commands. It would help if at least PART of the new structure were similar to the original.

    An alternative would be to make little dummy pages in the original structure, and to have each one redirect to its new equivalent using PHP code.
    The webconfs website has quite a nice guide on redirection methods like that....
  8. #5
  9. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Location
    New Jersey, US
    Posts
    91
    Rep Power
    15
    Originally Posted by dzine
    The Redirect command only does complete websites or structures. It attaches the URL found at the original address to the target address.

    If you want to perform a page-by-page redirect with some fancy formatting, you'll have to use mod_rewrite instead. It's quite complicated, depending on what you want to achieve. See also:
    .htaccess tips
    I think I may be misunderstanding something here. Soon after making my website I decided to change the pages from .htm to .php. After reading up on the best way to do that without losing page rankings, I did it by putting the following into my .htaccess file: redirect 301 /services.htm http://www.mywebsite.com/services.php

    The 301 redirect works fine for me on all the pages that I did it for. So I am curious why you said that a 301 redirect only does complete websites and not page by page redirects? Should I be doing something else?

    Thanks.
  10. #6
  11. SEO Insultant
    SEO Chat Mastermind (5000+ posts)

    Join Date
    Oct 2005
    Location
    sharing a room with my ego
    Posts
    5,747
    Rep Power
    1793
    Originally Posted by Contra
    So I am curious why you said that a 301 redirect only does complete websites and not page by page redirects? Should I be doing something else?
    My apologies. You are right and I was wrong. I was confused with the RedirectMatch /(.*) directive which I tend to use here and there
    In fact the only thing the Redirect thing appears to be able to do, is page-by-page redirections. That's why I never use it LOL: too much hassle.

    Note to the O.P.: when I look at your URLs, it looks like your first "Redirect" should in theory be ok. But have you checked if there's also some redirecting going on on the new domain? You could be suffering from 2 or more clashing Redirect or Rewrite rules...
  12. #7
  13. Busting SEOChat Spammers!
    SEO Chat High Scholar (3500 - 3999 posts)

    Join Date
    Jul 2009
    Location
    UK - Kent - Maidstone - PC!
    Posts
    3,754
    Rep Power
    1476
    Your best option would be to post your htaccess file here (change the domain if you don't what to share it publicly), then people could take a look over it and help you simplify it and make sure its all working correctly.

    For example, it sounds like you could quite easily simplify your htaccess with
    Code:
    RedirectMatch 301 (.*)\.html$ http://www.domain.com$1.php
    Instead of having to write out each pages redirect as you posted above.
    New To SEOChat? See Here & the FAQ's

    "stupid people say stupid things, and smart people out smart each other!" SOAD
    301 Redirects | SEO Tools | Default htaccess | CuteRank
  14. #8
  15. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Nov 2011
    Posts
    24
    Rep Power
    0
    Wow, I didn't know the 301 redirect method didn't work on subpages either. After reading forums over the years, I always thought it did and was planning on doing a lot of redirecting soon. I guess I have some learning to do. Thanks for bringing up the topic.

Similar Threads

  1. 301 redirect Advise Needed
    By Omniforce in forum Google Optimization
    Replies: 5
    Last Post: Apr 12th, 2011, 07:58 AM
  2. Mass redirect needed.
    By Glenn Kilpatric in forum Web Design, Coding and Programming
    Replies: 15
    Last Post: Feb 26th, 2010, 10:19 AM
  3. Is A 301 Redirect Needed
    By themayor in forum Google Optimization
    Replies: 4
    Last Post: Dec 4th, 2007, 10:55 PM
  4. 301 redirect issue help needed
    By jjaall99 in forum Google Optimization
    Replies: 9
    Last Post: Jul 25th, 2006, 09:41 AM
  5. Help Needed for Redirect
    By topgun in forum Google Optimization
    Replies: 11
    Last Post: Mar 6th, 2005, 02:15 PM

IMN logo majestic logo threadwatch logo seochat tools logo