htaccess redirect for pointing a URL to another URL

Discussion in 'vBulletin Discussions' started by ArnyVee, Oct 21, 2009.

  1. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    Hey folks,

    I've never really messed around with the htaccess file(s), but I want to temporarily have my MagicThemeParks.com URL point to MagicThemeParks.com/mk/forum until I have the homepage completed.

    I'm sure it's simple, but I wanted to make sure that I didn't miss anything or there were any special rules to type out. Thanks! :D

    I did a little Google search and it looks like this might work, but wanted to check with my fellow brains here at AA ;)

    Code:
    Redirect 301 /magicthemeparks.com http://www.magicthemeparks.com/mk/forum
    Would that work?

    Also, once I want to have the homepage 'back', do I simply remove the redirect in the htaccess and that's it?
     
  2. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    thats it arny!

    whenever you dont want it to redirect just remove it ;)
     
    2 people like this.
  3. Abomination

    Abomination Zealot

    Joined:
    Jun 1, 2009
    Messages:
    1,514
    Likes Received:
    102
    Is it that simple? I have been trying really hard to figure out how that works. Does it add much time/overhead?
     
  4. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    Yes for a simple one page 301 redirect its that simple.

    It won't add noticeable time or overhead.
     
  5. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    Okay, so I added the redirect line into a .htaccess file and uploaded it to my magicthemeparks.com directory. But, it's not doing any redirecting. Does it take some time before it goes into effect?
     
  6. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    Sorry, didn't notice the typo in the first post, try this one instead

    Code:
    Redirect 301 /index.html http://www.magicthemeparks.com/mk/forum
    If that doesn't do it (or incase your server wants index.php before index.html)
    Code:
    Redirect 301 http://magicthemeparks.com http://www.magicthemeparks.com/mk/forum
    
    Should do the trick
     
    2 people like this.
  7. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    David, worked with the first one! :)

    Thanks for the help! :D
     

Share This Page