1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do you 301 redirect sub-pages?

Discussion in 'Black Hat SEO' started by PaperToy, Feb 23, 2016.

  1. PaperToy

    PaperToy Regular Member

    Joined:
    Jul 2, 2013
    Messages:
    334
    Likes Received:
    89
  2. snaip

    snaip Junior Member

    Joined:
    Oct 3, 2014
    Messages:
    100
    Likes Received:
    29
    Gender:
    Male
    You need hosting for bigdomain.com. Put this in bigdomain.com's .htaccess file:
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !smallsite.com$ [NC]
    RewriteRule ^(.*)$ http://smallsite.com/$1 [L,R=301]
    
     
    • Thanks Thanks x 1
  3. PaperToy

    PaperToy Regular Member

    Joined:
    Jul 2, 2013
    Messages:
    334
    Likes Received:
    89
    Would that be the only code placed in the .htaccess?
     
  4. alwaystoday

    alwaystoday Junior Member

    Joined:
    Jan 23, 2016
    Messages:
    179
    Likes Received:
    64
    Occupation:
    Self Employed IM and website developer
    if you use/trasnfer namesilo they offer cloaked paths redirection, that would be simplest solution
     
  5. PaperToy

    PaperToy Regular Member

    Joined:
    Jul 2, 2013
    Messages:
    334
    Likes Received:
    89
    This doesn't solve the problem. The correct code I found is this:

    Code:
    [B][COLOR=#222426][FONT=Consolas]RewriteEngine on
    [/FONT][/COLOR]RewriteCond %{http_host} ^www.old.com [NC,OR]
    RewriteCond %{http_host} ^old.com [NC]
    RewriteRule ^(.*)$ http://www.thenewdomain.org/ [R=301,NC,L][/B]
    
     
    Last edited: Feb 23, 2016
  6. mklyons

    mklyons BANNED BANNED

    Joined:
    Feb 6, 2015
    Messages:
    53
    Likes Received:
    12
    you using as a clocker?