Jump to content

Problem with url without www in dynamic virtual hosting ?


tomekf

Recommended Posts

Hi everyone,

I have a little problem with url without www in dynamic virtual hosting.

This is part of my http.conf

[code]NameVirtualHost xxx.xxx.xxx.xxx:80

<VirtualHost domain.com>
ServerName domain.com
ServerAlias *.domain.com
VirtualDocumentRoot /vhosts/%0
ErrorLog /var/log/apache/domain-error.log
CustomLog /var/log/apache/domain-access.log full
</VirtualHost>[/code]

I would like to change in webbrowser url from *.domain.com to www.*.domain.com

I find code:

[code]RewriteEngine on
RewriteRule ^(.*)$ http://name.domain.com$0 [R]
ServerName www.name.domain.com[/code]

but I can't use it :(

Can anybody help me ?

Thanks.



Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.