Forum Moderators: phranque

Message Too Old, No Replies

subdomain mod_rewrite

Can I rewrite a subdomain to Drupal subdirectory?

         

a2000swim

7:56 pm on Mar 29, 2007 (gmt 0)

10+ Year Member



I recently discovered how to use apache's mod_rewrite (at .htaccess level)

I have a subdomain "sub.domain.com" that I would like to see if I can use the rewrite capability to actually have load what is "www.domain.com/virtual/directory/1", where "/virtual/directory/1" actually is not in my file structure (it is created by another system - Drupal).

Currently, in the httpd.conf file, sub.domain.com is set up as a VirtualHost to a subdirectory (it points to /domain/sub/). I can change this to act as an alias and just point to /domain/, but we would prefer for the file structure to remain with the subdirectory, if possible.

Is it possible to do a rewrite on a subdomain in such a manner? I have VirtualHosts configured in my httpd.conf with other subdomains, but they all are able to use real DocumentRoots

thanks