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

Redirect 301 strange problem

Discussion in 'BlackHat Lounge' started by toysonline, Sep 13, 2013.

  1. toysonline

    toysonline Regular Member

    Joined:
    Jul 28, 2010
    Messages:
    293
    Likes Received:
    166
    Occupation:
    Internet Marketer
    Location:
    Asia
    Home Page:
    hi guys. i have this strange problem on my 301 redirect website. i checked online but cannot find same problem.

    i have old website (www.oldwebsite.com) and a new website(www.newwebsite.com). these are both static html websites. i want the old one redirect to the new website.

    i edit .htaccess and put below:

    Redirect 301 / http://www.newwebsite.com
    Redirect 301 /subpage1.html http://www.newwebsite.com/subpage1.html
    Redirect 301 /subpage2.html http://www.newwebsite.com/subpage2.html

    when someone type the url of the old site, its working fine and will right away display the new site. the problem arise on the subpages.

    when someone visit http://www.oldwebsite.com/subpage1.html the browser will redirect to http://www.newwebsite.comsubpage1.html

    for whatever reason, the redirect site url don't have the "/" after .com, causing it display invalid website.

    anyone who have experienced this before? can you share how you solve this issue? thanks.
     
  2. socialblast

    socialblast Regular Member

    Joined:
    Feb 2, 2013
    Messages:
    250
    Likes Received:
    77
  3. Riders On The Storm

    Riders On The Storm Senior Member

    Joined:
    Feb 27, 2012
    Messages:
    1,150
    Likes Received:
    489
    hmmmmmmm
     
  4. fren99

    fren99 Power Member

    Joined:
    Jul 15, 2012
    Messages:
    654
    Likes Received:
    198
    Last edited: Sep 13, 2013
  5. Vic Sage

    Vic Sage Jr. VIP Jr. VIP

    Joined:
    Sep 5, 2010
    Messages:
    1,716
    Likes Received:
    2,110
    Gender:
    Male
    Occupation:
    Scientist Performing Marketing Experiments
    If you want the old site to fully redirect to the new site remove every from .htaccess and add the following code -