MOD_REWRITE for subdomains

Discussion in 'Apache' started by DLM3, Jun 13, 2010.

  1. #1
    I have a domain name and I want a subdomain attached to it. I need a mod rewrite to direct it to a specific folder.

    This is an example of what I am looking for:

    If I goto files.mydomain.com/folder1
    I want it to actually goto files.mydomain.com/files/folder1
    BUT I will only need to type: files.mydomain.com/folder1

    What I have running is a directory script that is running off another mod_rewrite in the 'FILES' folder. and it is getting the extra variables from what is after 'files/'.

    I just want to be able to type 'files.mydomain.com/folder1' and have it tell it to actually goto: files.mydomain.com/files/folder1

    I really wish I understood REGEX!! I Envy everyone that can write it.
     
    DLM3, Jun 13, 2010 IP