Re: [Apache] Vhost with mod_rewrite
On Wed, Jan 19, 2005 at 11:17:52PM +0100, Gob42 wrote:
> I want to set up virtual host with sub-domain using mod_rewrite. My
> actual configuration is like this one but for all my domains.
On Thu, Jan 20, 2005 at 11:32:52AM +0000, Jon Dowland wrote:
> This is not what mod_rewrite is for. It matches on the path portion of a
> URL, not the domain portion. Someone can correct me if I'm wrong.
I think the OP was hoping mod_rewrite would rewrite his configuration
files for him. It definitely won't do that.
In case you don't know how to do what Jon suggested, try something like
this:
#!/usr/bin/perl -p
BEGIN { $domain = shift; }
s/domaine\.tld/$domain/g;
That will change the "domain.tld" in your example to a domain name you
pass on the command line.
Reply to: