Submit Your Article Forum Rules

Results 1 to 4 of 4

Thread: How to 301 redirect an entire website to a single page of a different domain

  1. #1
    Senior Member
    Join Date
    Aug 2005
    Posts
    124

    How to 301 redirect an entire website to a single page of a different domain

    For a normal site redirect I can add the following line of code to the .htaccess file:

    Code:
    Redirect 301 / http://www.NEWSITE.com/
    so i thought that if I used:

    that it would redirect all pages to but the results were not quite as expected.

    I searched and searched Google but this doesn't seem to be a high demand need.

    Does anyone know how to redirect an entire website to a single page of another website using .htaccess (other methods also welcome).

  2. #2
    Senior Member
    Join Date
    Dec 2007
    Posts
    212
    Hi,

    Try this:
    Code:
    RewriteEngine on
    RewriteRule ^.*$ http://www.NEWSITE.com/SPECIALPAGE/ [L,R=301]
    Jean-Luc
    200ok.eu Broken Link Checker finds 404 errors, error pages with 200 ok status, missing images, protocol errors, password protected pages, bad domain names, redirect loops, parking pages, ...

  3. The following user agrees with Jean-Luc:
  4. #3

  5. #4
    WebProWorld MVP wige's Avatar
    Join Date
    Jun 2006
    Posts
    3,138
    Just as a (faster, lighter, less resource intensive) alternative:

    RedirectMatch 301 (.*) http://www.newdomain.tld/newpage.ext
    The best way to learn anything, is to question everything.
    WigeDev - Freelance web and software development

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •