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 12th January 2011, 20:33
florix.net florix.net is offline
Member
 
Join Date: Oct 2010
Posts: 42
Thanks: 4
Thanked 1 Time in 1 Post
Default Rewrite rule: webmail.domain.com to domain.com/webmail

Hi ..

I am trying to redirect ...

http://webmail.domain.com/ to http://domain.com/webmail/

I have written following rewrite code inside one domain vhost file in /etc/httpd/conf/sites-enabled directory, but it is not working ... as ideas?

rewriteEngine on
rewriteLog "/var/log/httpd/rewrite_log"
rewriteLogLevel 9


RewriteCond %{HTTP_HOST} ^webmail.dsvtrust.org$
RewriteRule ^(.*)$ http://dsvtrust.org/webmail/ [R=301,L]
Reply With Quote
Sponsored Links
  #2  
Old 13th January 2011, 18:17
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Are there any errors in /var/log/httpd/rewrite_log or 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
  #3  
Old 20th January 2011, 06:55
florix.net florix.net is offline
Member
 
Join Date: Oct 2010
Posts: 42
Thanks: 4
Thanked 1 Time in 1 Post
Default

Just above the line

Include /etc/httpd/conf/sites-enabled/

I added following lines ..

<VirtualHost *:80>
ServerAlias webmail.*
RewriteEngine On
RewriteLog "/var/log/httpd/rewrite.log"
RewriteLogLevel 3
RewriteCond %{HTTP_HOST} ^webmail\.(.+) [NC]
RewriteRule (.*) http://%1/webmail/ [R=301,L]
</VirtualHost>
Reply With Quote
  #4  
Old 21st January 2011, 14:12
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
 
Default

Is it working now?
__________________
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
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
Mod-Rewrite Rule to Effect All Domains HyperAtom Installation/Configuration 8 17th August 2010 22:24
IPtables rule to let PPTP access LAN brianwebb01 Installation/Configuration 0 1st May 2008 21:23
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
Drupal and Apache Rewrite Rules andre Server Operation 10 4th May 2006 21:04


All times are GMT +2. The time now is 04:16.


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