Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #21  
Old 26th March 2009, 22:06
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
Mine was just an example. If you add a / at the end then its http://test.com/hello
The problem is that you Can't modified that file
Like you said before
You must not touch it

Because if you make a change on the cfg it will overwrite it

Where is the auto www function, that add that cfg to the vhost file :S?
Reply With Quote
Sponsored Links
  #22  
Old 26th March 2009, 22:33
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,411
Thanks: 834
Thanked 5,496 Times in 4,326 Posts
Default

You shall not modify the file, you shall add the / in the rewrite field. And I told you already in post #8 of this thread that you can modify the template. The remplates are in /usr/local/ispcnfig/server/conf/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #23  
Old 26th March 2009, 22:39
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
You shall not modify the file, you shall add the / in the rewrite field. And I told you already in post #8 of this thread that you can modify the template. The remplates are in /usr/local/ispcnfig/server/conf/
Sorry,
I found on vhost.conf.master

RewriteEngine on
<tmpl_loop name="redirects">
RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 <tmpl_var name='rewrite_type'>
</tmpl_loop>
</tmpl_if>

But if I add there the /
I I must to remove the / on all the aliases domain rediect?

How can I add the / when it do the "INSERT" on db of www auto redirects?
Reply With Quote
  #24  
Old 26th March 2009, 22:44
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,411
Thanks: 834
Thanked 5,496 Times in 4,326 Posts
Default

Quote:
But if I add there the /
I I must to remove the / on all the aliases domain rediect?
Seems as if you do not read my posts at all. No, I did not told you to add it there. Read again post 22:

"You shall not modify the file, you shall add the / in the rewrite field."
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #25  
Old 26th March 2009, 23:20
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
Seems as if you do not read my posts at all. No, I did not told you to add it there. Read again post 22:

"You shall not modify the file, you shall add the / in the rewrite field."
I'm sorry English isn't my native language

when you said
"You shall not modify the file," You weren't talking about *.vhost?
Are you talking about vhost.conf.master?


Where is, or at least how it is called the file where I shall add the /
"The templates are in /usr/local/ispcnfig/server/conf/"
I don't see where.
Reply With Quote
  #26  
Old 27th March 2009, 21:45
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

Till should delete my and his post regarding to my question because its like I was talking in spanish and he in german.

My issue is very simple

I want to rediect/rewrite, domain.com TO www.domain.com

I think it can be done with the Auto-Subdomain Option.

Well, that option for me, isn't work.
It doesn't add the rewrite rule to the vhost file. (It should do that?)

I know it isn't work because, I'm not being redirected if I go to domain.com

Thank you.
Reply With Quote
  #27  
Old 27th March 2009, 22:17
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,411
Thanks: 834
Thanked 5,496 Times in 4,326 Posts
Default

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]
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #28  
Old 27th March 2009, 23: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
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monit on Debian Hans Tips/Tricks/Mods 2 6th October 2008 13:53
add web site serr57 Installation/Configuration 18 13th April 2008 11:40
dns server error Hellbound General 7 2nd August 2007 09:18
ISP Services wouldn't restart any service, possibly Domain Host configuration issue. Kamran Shah Installation/Configuration 20 17th August 2006 17:33
UebiMiau login puntjuh Installation/Configuration 13 14th March 2006 18:24


All times are GMT +2. The time now is 18:07.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.