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
    Regular Coder howie2009's Avatar
    Join Date
    May 2009
    Location
    Ireland
    Posts
    204
    Thanks
    37
    Thanked 0 Times in 0 Posts

    htaccess question

    Hi Guys,
    I'm sure there a way to do this.
    If I have a site called eg www.mysite.com and the site files are in a directory called site so www.mysite.com/site/index.php..

    Is there a way in htaccess or other so that I can hide "site" in the url so that that it looks like the user is in the root? I'm just building a new site into an existing site and would like to be able to switch over easily to the new directory but not have "site" in the url. I don't want the user to know they are in a directory called site.

    Hope i explained this well.

    Thanks

  • #2
    Regular Coder howie2009's Avatar
    Join Date
    May 2009
    Location
    Ireland
    Posts
    204
    Thanks
    37
    Thanked 0 Times in 0 Posts
    This kinda does it for just redirecting the root

    Code:
    RewriteEngine On
    RewriteRule ^(.*)$ subdirectory/$1 [L]
    but I need navigation links in the website to drop the word site in the url too.


  •  

    Posting Permissions

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