This is a discussion on DNS wildcards with mod_vhost_alias within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, is it possible to configure mod_vhost_alias to translate: - www.somedomain.net => /home/somedomain.net/www - subdomain.somedomain.net =&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi, is it possible to configure mod_vhost_alias to translate:
- www.somedomain.net => /home/somedomain.net/www - subdomain.somedomain.net => /home/somedomain.net/somedomain - somedemain.net => /home/somedomain.net/www ? I get to: VirtualDocumentRoot /home/%-2.0.%-1/%-3+ but if no third part from last is present, Apache replaces it with underscope. I need to tell Apache to replace it with "www". Or should i use mod_rewrite instead? Thanks for an advice |
|
|||
|
"Ladislav Durchánek" <durchanek@gmail.com> schreef in bericht
news:ddl3qi$o3r$1@news.vol.cz... > Hi, is it possible to configure mod_vhost_alias to translate: > - www.somedomain.net => /home/somedomain.net/www > - subdomain.somedomain.net => /home/somedomain.net/somedomain Traling somedomain ?? Assuming somedomain > - somedemain.net => /home/somedomain.net/www > ? > I get to: > > VirtualDocumentRoot /home/%-2.0.%-1/%-3+ > > but if no third part from last is present, Apache replaces it with > underscope. I need to tell Apache to replace it with "www". Or should i use > mod_rewrite instead? > How about at /home/somedomain.net run ln -s www _ and make the _ a symbolic link to www Do have your scripts eat and bake cookies for .somedomain.net IIRC this way of setting documentroot is not correctly replicate to the corresponding enviroment parameter. HansH |
|
|||
|
Thanks for tip, but i have to do that without symlink.
Ladislav "HansH" <hans@niet.op.het.net> píše v diskusním příspěvku news:42fe4674$0$11078$e4fe514c@news.xs4all.nl... > "Ladislav Durchánek" <durchanek@gmail.com> schreef in bericht > news:ddl3qi$o3r$1@news.vol.cz... >> Hi, is it possible to configure mod_vhost_alias to translate: >> - www.somedomain.net => /home/somedomain.net/www >> - subdomain.somedomain.net => /home/somedomain.net/somedomain > Traling somedomain ?? > Assuming somedomain > >> - somedemain.net => /home/somedomain.net/www >> ? >> I get to: >> >> VirtualDocumentRoot /home/%-2.0.%-1/%-3+ >> >> but if no third part from last is present, Apache replaces it with >> underscope. I need to tell Apache to replace it with "www". Or should i > use >> mod_rewrite instead? >> > How about at > /home/somedomain.net > run > ln -s www _ > and make the _ a symbolic link to www > > Do have your scripts eat and bake cookies for .somedomain.net > > IIRC this way of setting documentroot is not correctly replicate to the > corresponding enviroment parameter. > > > HansH > > |