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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 24th January 2009, 00:11
pcxtra pcxtra is offline
Junior Member
Join Date: Nov 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Domain Forward http should not lower case

Issue + solution: I have a domain which needs to forward to another url with case sensitive URL. I used the domain forward form in the co-domain tab.

The forward URL should be something like http://www.mydestdomain.com/pageXYZ.html
while ISPconfig forces to lowercase and will forward to

The piece of code responsible to force lowercase is in the file /root/ispconfig/scripts/lib/config.lib.php:

PHP Code:
  if(substr($domain["domain_weiterleitung"],0,4) == "http" || substr($domain["domain_weiterleitung"],0,4) == "HTTP"){
$domain["domain_weiterleitung"] = [COLOR="Red"]strtolower[/COLOR]($domain["domain_weiterleitung"]);
substr($domain["domain_weiterleitung"],-1) == "/"$domain["domain_weiterleitung"] = substr($domain["domain_weiterleitung"],0,-1);
$rewrite_rule .= "\nRewriteRule ^/(.*)         ".$domain["domain_weiterleitung"]."/$1 [L,R]";
          } else {
//if(substr($domain["domain_weiterleitung"],-1) != "/") $domain["domain_weiterleitung"] .= "/";
if(substr($domain["domain_weiterleitung"],0,1) != "/"$domain["domain_weiterleitung"] = "/".$domain["domain_weiterleitung"];
$rewrite_rule .= "\nRewriteRule   ^/(.*)$  http://".$servername.$domain["domain_weiterleitung"]."$1  [R]";
So locate the strtolower( ) call and remove it. This will prevent the forward URL to be converted to lowercase.

the correct result (after fix) in /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf:

ewriteEngine on
RewriteCond %{HTTP_HOST} ^mysourcedomainn\.com [NC]
RewriteRule ^/(.*) http://www.mydestdomain.com/pageXYZ.html?/$1 [L,R]
RewriteCond %{HTTP_HOST} ^www\.mysourcedomain\.com [NC]
RewriteRule ^/(.*) http://www.mydestdomain.com/pageXYZ.html?/$1 [L,R]

Furthermore you cannot forward the main domain, but only the co-domain. I had to change the www of the main domain into 'forward' (or something else never used), then make two co-domains, one with www and one without and both to forward to the new URL.

Somthing ISPConfig could implement?
Reply With Quote
Sponsored Links
Old 24th January 2009, 10:57
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts

I've added this to the bugtracker.
Till Brehm
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote


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
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 17:54
forward sub domain chua_jose Installation/Configuration 1 4th September 2008 16:59
can not forward email to an account on the same domain sygram Installation/Configuration 7 6th June 2008 16:36
kernel compile error/ndiswrapper error Droogie Kernel Questions 1 28th April 2008 22:38
phantom mx domain still in system after removal, can't forward offsite. minezamac Installation/Configuration 5 1st November 2007 21:19

All times are GMT +2. The time now is 22:50.

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