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

[Help]Redirect a new domain to an old domain

Discussion in 'Black Hat SEO' started by wizard04, May 7, 2015.

  1. wizard04

    wizard04 Elite Member

    Joined:
    Apr 1, 2014
    Messages:
    2,698
    Likes Received:
    2,540
    Location:
    Outside your house
    I have a new domain I want to redirect to an old domain.


    Example if someone is wire domain1.com/page-blabla
    I want it to redirect to domain2.com/page-blabla

    I have tryed everything but I am always redirected to the homepage/root

    Whatever I write it ill point me to domain2.com

    I want to play it safe in twitter I don't want to share my url with to many accounts. I want to buy few more domains and do the exact thing.

    I have tried lots of codes for htacces but nothing works. Maybe they are if you have the same files to new domain and old domain.
     
  2. wizard04

    wizard04 Elite Member

    Joined:
    Apr 1, 2014
    Messages:
    2,698
    Likes Received:
    2,540
    Location:
    Outside your house
    Found it :D

    It toked hours and hours changing 100 of htaccess codes but I finally found it!

    for everyone there who is looking for something like that.

    open a .htaccess file and past this:

    Code:
    <ifmodule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule (.*) http://newdomain.com/$1 [R=301,L]
    </ifmodule>
     
    • Thanks Thanks x 1
  3. TheLinkGuy

    TheLinkGuy Power Member

    Joined:
    Nov 20, 2010
    Messages:
    634
    Likes Received:
    130
    Location:
    EU
    This was exactly what I was gonna recommend, it takes a bit of time. Good share for others that need this code though.