Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 13th February 2007, 10:47
sfrank sfrank is offline
Junior Member
Join Date: May 2006
Posts: 22
Thanks: 0
Thanked 4 Times in 1 Post
Default Co/sub-domains without rewritten URLs

I've recently overcome a much debated situation, I needed subdomain support without URL rewriting.

For this example let's assume the site's primary domain is domain.tld and we'd like to create test.domain.tld with totally separate content.

The standard ISPConfig way of sub-domain creation is as follows:
- Add a new co-domain
- Hit the Forward option and put a folder's name in there
- Create the folder in the webroot

With this setup, if you visit http://test.domain.tld you'll get served with the content of the desired folder, though the mod_rewrite operation takes place in a manner not hidden from the user so thus the address in the URL bar of the browser immediately switches to http://domain.tld/test to show the real path the content is coming from.

This sometimes is not desirable, so I needed a "fix".
Here it is:
In /root/ispconfig/scripts/lib/config.lib.php at line 1368 remove the text [R].

Explanation: The R flag tells mod_rewrite that when it applied the rewrite rule on the URL it shall not feed it to Apache "URL to file parsing" mechanism internally, but start a whole new request by rewriting the address in the user's browser and reloading it.

Hope it helps some who wants to achieve the same behavior.

I've got confirmation from Till that this modification does not break any part of the code, but you need to note that this solution is not upgrade persistent. This means that any time you upgrade ISPConfig this file might get overwritten.

Furthermore as so many people would like to see this function added to ISPConfig, it'd be nice to somehow implement this one leaving the existing feature intact.

A "Do you want rewritten URLs" checkbox on the Forward tab maybe?
Reply With Quote
The Following 4 Users Say Thank You to sfrank For This Useful Post:
Been Told (17th January 2009), huschi (14th July 2008), minimalist (27th August 2009), PierreR32 (25th May 2007)
Sponsored Links


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
Strange email problem for one of my domains... any help appreciated paulrobert_a Installation/Configuration 5 9th August 2010 15:15
Virtual Users And Domains With Postfix, Courier And MySQL Secondary MX acoghlan HOWTO-Related Questions 1 8th March 2008 06:02
different counting of domains torusturtle Feature Requests 7 9th May 2007 23:18
missing feature: email-aliases for multiple domains olaus Feature Requests 5 30th March 2006 13:07
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 03:53

All times are GMT +2. The time now is 21:42.

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