getting .htaccess to do httpd.conf's job
June 2, 2008 3:37 AM
Subscribe
Mod_rewrite and subdirectories and subdomains, oh my!
I'm using a hosting service (Lunarpages) that maps the document root of subdomains to a corresponding subdirectory in the primary domain root (i.e. the public_html directory). Thus: sub1.mysite com has mysite.com/sub1/ as its / directory.
I've also got sub2.mysite.com, which has its document root automatically and unalterably set to mysite.com/sub2/. I would like URLs to sub2.mysite.com to be rewritten so that they go to sub1.mysite.com. A standard external redirect isn't going to work in this case, because the code in /foo/ needs to parse the incoming subdomain.
Got .htaccess, anyone?
(This is, of course, something that would take 0.3s to solve if I could get at the bloody httpd.conf.)
posted by holgate to computers & internet (8 comments total)
1 user marked this as a favorite
Redirect / http://sub1.mysite.com/
More on mod_alias.
posted by Remy at 4:14 AM on June 2, 2008