Jump to content


Problem with url without www in dynamic virtual hosting ?

  • Please log in to reply
No replies to this topic

#1 tomekf

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 16 October 2006 - 07:12 PM

Hi everyone,

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

This is part of my http.conf

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

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

I find code:

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

but I can't use it :(

Can anybody help me ?


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users