Mar 12

mod_rewrite help

  • I'm running a plesk server and I want to provide a way for people to view their domain even though the dns hasn't propogated. I know this can be done using mod_rewrite as i have seen it used before.

    The owner provides a free domain like say www.blah.com and the customers site is www.site.com

    the custom could then go to http://www.blah.com/www.site.com and the document root for www.site.com is /usr/local/psa/home/vhosts/www.site.com/httpdocs i could make an entry for each site but i think this seems pointless so i wish to find a way to use one statement, any help woudl be appreciated.

    Scott


  • I haven't tried it, but it should work...


  • Try this in your httpd.conf:

    AliasMatch ^/([^/]+)(/(.*))? /usr/local/psa/home/vhosts/$1/httpdocs

    or:

    AliasMatch ^/([^/]+)(/(.*))? /usr/local/psa/home/vhosts/$1/httpdocs/


    Would be either way, and not need rewrite....


  • i can put that within the virtualhost tags for my domain i'm using for letting hostees see page then?







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about mod_rewrite help , Please add it free.