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

Please help with this 302 redirection - htaccess

Discussion in 'General Programming Chat' started by SuperNoobInc, Jul 23, 2012.

  1. SuperNoobInc

    SuperNoobInc Regular Member

    Joined:
    Dec 28, 2011
    Messages:
    467
    Likes Received:
    32
    I am planning to revmap my existing old-skool .html site but at the same time, i dont want my visitors to be affected by it.


    What I plan to do is:


    1. Move all 'existing' files to a sub-directory known as new (www.mysite.com/new)
    2. Setup .htaccess so that all visitors will automatically redirected to the new sub-directory EXCEPT for myself


    And not surprisingly, I am stuck at the 2nd step. I researched and read a couple of tutorials online and I couldnt get it working.
    Some failed to detect my IP, some gives me infinite redirecting loop or whatever;


    and most of all, I am not sure how this can be done, but I would like to users who once 'bookmarked' my site to be directed
    to new URL accordingly as well. For example;


    mysite.com/aboutus.html ---> mysite.com/new/aboutus.html


    Hope someone can point me to the right direction. Thx