How do I point all old links to homepage

4 replies
I've recently bought an expired domain that used to be a directory that had 1000's of pages and 1000's of incoming links from other sites. I need to make sure that any traffic following these links land on the homepage for the domain.

I've been searching for an answer online but every answer assumes your moving to a new domain. I'm not. I just want all historic incoming links to resolve to the homepage of the same domain.

I don't care if it's bad seo because I'm not interested in search engine traffic, this is just a temporary project to push some old traffic into a new funnel. Please help

This is the answer I have so far using HTACCESS:
Code:
RewriteEngine on RewriteCond %{HTTP_HOST} old\.com$ RewriteRule .* http://www.new.com/? [L,R=301]
But isn't this is to direct to a new domain name?
I can't put the same domain in each rule can I?
#homepage #links #point
  • Profile picture of the author RobinInTexas
    Try this using .htaccess & the mod_rewrite module.

    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* index.php [R=301]
    Or instead of index.php, whatever file you want them to see.

    This should redirect requests to URIs that aren't files or directories with a 301 header
    Signature

    Robin



    ...Even if you're on the right track, you'll get run over if you just set there.
    {{ DiscussionBoard.errors[9033416].message }}
    • Profile picture of the author sitehero
      Originally Posted by RobinInTexas View Post

      Try this using .htaccess & the mod_rewrite module.

      Code:
      RewriteEngine on
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule .* index.php [R=301]
      Or instead of index.php, whatever file you want them to see.

      This should redirect requests to URIs that aren't files or directories with a 301 header
      Thank you,
      I'll give that a go and report back.
      {{ DiscussionBoard.errors[9033456].message }}
    • Profile picture of the author sitehero
      Originally Posted by RobinInTexas View Post

      Try this using .htaccess & the mod_rewrite module.

      Code:
      RewriteEngine on
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule .* index.php [R=301]
      Or instead of index.php, whatever file you want them to see.

      This should redirect requests to URIs that aren't files or directories with a 301 header

      I tried this but it didn't work.

      After I uploaded the .htaccess file, I typed in two fake url's to see if they resolved back to the homepage...

      But the page just loads for a while and I end up with a Firefox page that says:

      The page isn't redirecting properly
      Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
      I don't know if this matters but I noticed the URL changed to one that had my hosting username folder and the public_html directory....

      {{ DiscussionBoard.errors[9034251].message }}
      • Profile picture of the author sitehero
        FINALLY. THANK GOODNESS, IT WORKS AT LAST!

        I cannot believe something SO simple has taken me almost 6 solid hours of searching for the answer.

        Here it is - this following code in the root .HTACCESS file will send all traffic to the homepage. So, if someone follows a link to a folder: SITE.dom/Directory/
        or, if someone follows a link to a file: SITE.dom/Directory/File.html they ALL get directed to the homepage: SITE.dom

        Code:
        RewriteEngine on
        RewriteCond %{REQUEST_URI} !/$
        RewriteRule $ / [R=302,L]
        I cannot believe something so unbelievably simple was so hard to find. I just hope me posting it here will help someone else in the future and save them hours of hair pulling and swearing at webpages.

        In case anyone is wondering why I would want to do this. I recently bought an expired domain with decent traffic at auction. My only concern for this domain is the traffic it gets. It used to be a directory website and it has 1000's on inbound links so I thought if I redirect all of these links to one landing page I can stick a lead capture on it and then forget about it for a few months. I'm not interesting in search rankings or authority for this domain so this seemed like the best option.
        {{ DiscussionBoard.errors[9034450].message }}

Trending Topics