Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Sim
    Sim is offline
    New Coder
    Join Date
    Feb 2009
    Posts
    82
    Thanks
    1
    Thanked 1 Time in 1 Post

    Need some quick help: redirect sub dir to root dir

    I just moved my forum from a sub directory to my root directory. I want to redirect all my old links from sub directory to the new links in root directory. How can I do this? ;]


    Path was "mydomain.com/forums"
    New Path is just "mydomain.com"

    ex: "mydomain.com/forums/general-discussion/sim-intro"
    I want to redirect to "mydomain.com/general-discussion/sim-intro"
    Last edited by Sim; 03-06-2011 at 01:52 PM. Reason: title edit
    Online RPG Creator - Create Your Own Online RPG with no programming knoweldge

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Sim View Post
    I just moved my forum from a sub directory to my root directory. I want to redirect all my old links from sub directory to the new links in root directory. How can I do this? ;]


    Path was "mydomain.com/forums"
    New Path is just "mydomain.com"

    ex: "mydomain.com/forums/general-discussion/sim-intro"
    I want to redirect to "mydomain.com/general-discussion/sim-intro"
    try this:

    http://httpd.apache.org/docs/2.2/mod...irectpermanent

    in .htaccess:

    Code:
    RedirectPermanent http://mydomain.com/forums http://mydomain.com/
    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •