Mod rewrite access folder before root

Discussion in 'Apache' started by cshinnimin, Mar 22, 2010.

  1. #1
    Hi everyone,

    I am wondering if it is possible to use htaccess to access folders BEFORE the root folder...

    I have designed two seperate sites that get hosted seperately as subdomains. The file structure on the server is then something like:

    
    /
         www.site.com/
              folder1/
              folder2/
              folder3/
         admin.site.com/
              folder1
              folder2/
              folder3/
    
    Code (markup):
    The folder "www.site.com" is the root directory of subdomain www.site.com and the folder "admin.site.com" is the root of the subdomain admin.site.com

    The problem is that I know need to access /www.site.com/folder2/ from /admin.site.com/mainsiteaccess/ for example. Is this possible, given that they are seperately hosted subdomains?

    I was hoping to be able to route say admin.site.com/mainsiteaccess/* to www.site.com/*

    Thanks!
     
    cshinnimin, Mar 22, 2010 IP
  2. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #2
    Depends exactly what you want to do but short answer is yes.
    An iframe or a redirect should do but it does depend on what you want to achieve.
     
    tolra, Mar 22, 2010 IP