301 Redirect Entire Site.

5 replies
  • SEO
  • |
Hi, I want to redirect every page on my old site (Wordpress) to a single page on my new site (Wordpress), what is the best htaccess rule to use? I have found rules that permanentlty redirect the index page, but can't find a rule that redirects every page to a single page.

Any help would be greatly appreciated!
#301 #entire #redirect #site
  • Profile picture of the author banana1
    A 301 redirect should permanently redirect the whole site. Someone correct me if I'm wrong but I'm 99% sure that's how it works.
    {{ DiscussionBoard.errors[3940528].message }}
  • Profile picture of the author The Night Fox
    That was my understanding too, but I just implemented the following rule and it has only redirected my index page. I know this because if I go to myoldsite . com / Page I am able to view it.

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http : //w w w . newdomain . com/$1 [R=301,L]
    Please ignore the spaces in the URL in the above code, I have too few posts to post a URL.
    {{ DiscussionBoard.errors[3940539].message }}
    • Profile picture of the author chinmokuyuuki
      Code:
      RedirectMatch 301 ^/.+$ http://www.example.com/
      Signature
      Get Quality Backlinks for a Low Price! - BacklinkCenter.net Your one stop shop for backlinks. Over 400 Forum Profile Links / 130 Blog Comments for €1,- !
      {{ DiscussionBoard.errors[3941024].message }}
  • Profile picture of the author The Night Fox
    Do I replace my code with that or do I add it to the code? You'll have to forgive me, I'm not too familiar with htaccess!
    {{ DiscussionBoard.errors[3941039].message }}
    • Profile picture of the author chinmokuyuuki
      The above will permanently redirect all pages on the current website to the website specified. You won't need other code.
      If for whatever reason it doesn't work you can try to remove then '301' as it isn't necessary to supply that argument.
      Signature
      Get Quality Backlinks for a Low Price! - BacklinkCenter.net Your one stop shop for backlinks. Over 400 Forum Profile Links / 130 Blog Comments for €1,- !
      {{ DiscussionBoard.errors[3941045].message }}

Trending Topics