View Single Post
  #28  
Old 28th March 2009, 00:40
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

Quote:
Originally Posted by till View Post
Here is your first post in the thread:

-------------------------------------------------------------
but this isn't 100% truth

I ve modified my .vhost from apache2

Restarted apache2 and works fine

But, if I reboot, ispc restore the .vhost file

Why?
---------------------------------------------------------------

So were did you ask this question there? The first time you asked
the question how to rewrite domain.com to www.domain.com in your last post #26.

There is no redirect needed as you get the same content of the website when you
enable the auto subdomain when you enter www.domain.com
or just domain.com. Thats what the function is intended to do and
this is what the function does.

If you automatically want to rewrite domain.com to www.domain.com
which is not nescessary but can be done of course e.g for search engine optimisation, you can do this with apache rewrite rules that can be added to the apache directives field (See my post #8 part 3) in case that you want to have other rewrite rules then the ones that ispconfig adds on the rewrite tab.

For example just add:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^/(.*)$ http://www.domain.com/$1 [R]
My question is there in the thread using a complex language :P.

The conclusion

What Auto-Subdomain Option does?
It just add a subdomain www. or *. (serveralias vhost)

If you want to do the redirect of .dom.com -> www.dom.com You should create your own .htaccess.
Or using the apache directive option.

-
I will try apache directive method.

Thank you Till

--

I think the whole problem was I had a .htaccess and that was doing the rewrite.
Reply With Quote