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

URL Redirection help needed

Discussion in 'Black Hat SEO' started by anishrip23, Nov 12, 2013.

  1. anishrip23

    anishrip23 Regular Member

    Joined:
    Jul 17, 2011
    Messages:
    210
    Likes Received:
    78
    Hey guys need help its urgent.

    How to redirect xxxxxxxx.com/video-1/ to yyyyyyyy.com/video-1/
    I want to change only website but not remaining url


    Thanks!!
     
  2. bluehatface

    bluehatface Regular Member

    Joined:
    Oct 19, 2013
    Messages:
    232
    Likes Received:
    98
    Location:
    Here
    edit your .htaccess file at the root of your original domain (or create one) and create a 301 redirect....

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) hppt://yournewdomain.c0m/$1 [R=301,L]:
    That should redirect your entire domain. Or did you want to do just the one page?

    (The domain should be the full URL, but I can't post proper looking URLs yet!)
     
  3. itsdjango

    itsdjango Regular Member

    Joined:
    Jun 16, 2013
    Messages:
    327
    Likes Received:
    59
    Occupation:
    Engineer.
    Location:
    outside your window
    Which Platform are you using ?? ex. any CMS?
     
  4. anishrip23

    anishrip23 Regular Member

    Joined:
    Jul 17, 2011
    Messages:
    210
    Likes Received:
    78
    Thanks for your help.. I have already solved my problem..
     
  5. anishrip23

    anishrip23 Regular Member

    Joined:
    Jul 17, 2011
    Messages:
    210
    Likes Received:
    78
    How i did it
    Here's the code if anyone needed this


    Code:
    Options +FollowSymlinks -MultiViews
    RewriteEngine on
    
    # for http
    RewriteCond %{HTTP_HOST} ^(www\.)?domainA\.com$ [NC]
    RewriteCond %{SERVER_PORT} =80
    RewriteRule ^(.*)$ http://www.domainB.com/$1 [R=301,L]
    
    # for https
    RewriteCond %{HTTP_HOST} ^(www\.)?domainA\.com$ [NC]
    RewriteCond %{SERVER_PORT} =443
    RewriteRule ^(.*)$ https://www.domainB.com/$1 [R=301,L]

    It is for .htaccess
     
  6. anishrip23

    anishrip23 Regular Member

    Joined:
    Jul 17, 2011
    Messages:
    210
    Likes Received:
    78
    I am using wordpress
     
  7. KevinK

    KevinK Junior Member

    Joined:
    Jul 24, 2008
    Messages:
    159
    Likes Received:
    87
    you can redirect using the DNS...
    you can redirect using .htaccess...
    you can redirect using headers...
    and

    you can redirect using meta refresh.

    Is it a 301 or a 302 redirect? and does SEO matter?
     
  8. anishrip23

    anishrip23 Regular Member

    Joined:
    Jul 17, 2011
    Messages:
    210
    Likes Received:
    78
    Yes it is 301.
    I needed that code for some other purpose not for seo so can't tell you about this.
     
    Last edited: Nov 13, 2013
  9. KevinK

    KevinK Junior Member

    Joined:
    Jul 24, 2008
    Messages:
    159
    Likes Received:
    87
    you might want to check it...

    301 is permanent, I believe...
    if it's 302 then change 301 to 302.
     
  10. gyaseen1986

    gyaseen1986 BANNED BANNED

    Joined:
    Oct 11, 2013
    Messages:
    56
    Likes Received:
    3
    you check it

    301 is permanent,
    I believe...if it's 302 then change 301 to 302.
     
  11. devde

    devde Registered Member

    Joined:
    Jan 5, 2013
    Messages:
    76
    Likes Received:
    23
    just write this code in your .htaccess file (it should be in you root directory, if isn't there just create one with a text editor like notepad and upload by ftp)
    Code:
    Redirect 301 http://old-address http://newaddress
    if you want a 302 redirect just change 301 to 302