Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th August 2010, 16:13
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
Default Mod-Rewrite Rule to Effect All Domains

Hey all, just a simple question, which file can I put an rewrite rule into which will effect all domains.

I use httpd.conf for an apache alias which affects all domains, but adding the rewrite rule does not. Where could I possibly insert it to effect all of my sites?
Reply With Quote
Sponsored Links
  #2  
Old 14th August 2010, 15:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

According to http://httpd.apache.org/docs/2.2/mod...ml#rewriterule , you can put it in the server config, virtual host, directory, .htaccess.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 14th August 2010, 20:47
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
Default

Hi Falko, I've read through the documentation and I'm adding the correct rules etc. The thing is, the code doesn't work in any file but the .vhost for specific domains.

I want to achieve a mod rewrite which is applicable to every domain by setting the rule once is one file (httpd.conf). Surely this is a common action which people use.

Have you got a rule which I can use and modify that effects all domains?
Reply With Quote
  #4  
Old 15th August 2010, 18:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

What exactly did you add in your main Apache configuration?

Any errors in Apache's error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 16th August 2010, 00:04
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
Default

Hi Falko, I added these lines into httpd.conf which were taken straight from the domain's .vhost file. Apache is not throwing any errors at all. I have tested this rule in all the configuration files in the /etc/apache2/ directory but no luck. I am restarting apache every time I modify a file.

Code:
RewriteEngine on
RewriteRule ^/admin$ http://%{HTTP_HOST}:8080/ [L,R=301]
Reply With Quote
  #6  
Old 16th August 2010, 13:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

And it's working inside a vhost configuration, but not in the main Apache configuration?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 16th August 2010, 13:53
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
Default

Yes, httpd.conf is the main configuration file. I have other global setting in there that are working such as Alias etc.
Reply With Quote
  #8  
Old 17th August 2010, 18:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

That's strange...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 17th August 2010, 22:24
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
 
Default

Honestly try it yourself, I've done a fresh server install and its still the same
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
Exim Gateway with mailwatch (Unable to receive emails) siul0_0 HOWTO-Related Questions 10 8th May 2009 23:00
enable mod rewrite for the ISPconfig apache web server blocker General 3 18th April 2009 16:14
how to enable Mod Rewrite AngelDrago Installation/Configuration 9 10th August 2007 23:20
Set Up Ubuntu-Server 6.10 As A Firewall/Gateway knowram Installation/Configuration 10 13th June 2007 01:37
need some help with a .htaccess rewrite rule.. edge Server Operation 7 22nd July 2006 16:54


All times are GMT +2. The time now is 09:29.


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