
18th May 2007, 02:21
|
|
Senior Member
|
|
Join Date: Apr 2006
Posts: 287
Thanks: 18
Thanked 17 Times in 12 Posts
|
|
keeping subdomain URL in browser address bar
When creating a codomain (subdomain) and forward it to an internal folder the address bar of the browser changes displaying the forwarded folder.
e.g. if you set the forward for sub.domain.tld to /sub/ you'll get domain.tld/sub/
There are to ways to keep sub.domain.tld.
1. Option
Change the code of ISPConfig like described here:
Co/sub-domains without rewritten URLs
2. Option - Leave the forward value empty
- Add the following into the Apache Directives field:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC]
RewriteRule ^/(.*)$ /sub/$1 [L]
|
|
The Following 6 Users Say Thank You to torusturtle For This Useful Post:
|
|

19th May 2007, 01:09
|
|
Senior Member
|
|
Join Date: Oct 2006
Location: Czech republic, Karlovy Vary
Posts: 136
Thanks: 59
Thanked 10 Times in 10 Posts
|
|
Thanks for nice how-to is very usefull.
when you want more rewrites for more subdomains simply do this rewrite
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub1.domain.tld [NC]
RewriteRule ^/(.*)$ /sub1/$1 [L]
RewriteCond %{HTTP_HOST} ^sub2.domain.tld [NC]
RewriteRule ^/(.*)$ /sub2/$1 [L]
Will be very happy when someone integrate this to co-domain and that is created automaticaly if user want (radiobutton or something similiar).
|

24th May 2007, 19:19
|
|
Junior Member
|
|
Join Date: May 2007
Location: Ft Myers FL, USA
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
need help with this please
where it says sub.domain.tld do you replace that with your info thats reference in the co-domain page and where the /sub/ is you replace with the file location trying to use it for webmail redirection of squirrelmail.pkg without the address changing, also i only have the one site and the one redirect i'm trying to do i can't get either way mentioned in the forums to work for redirect without changing address
|

29th May 2007, 23:59
|
|
Senior Member
|
|
Join Date: Apr 2006
Posts: 287
Thanks: 18
Thanked 17 Times in 12 Posts
|
|
I guess you got it right.
Problem could be that squirrelmail.pkg gets installed outside the domains folder and thus can't get redirected to.
|

21st June 2007, 00:39
|
|
Junior Member
|
|
Join Date: May 2007
Posts: 18
Thanks: 6
Thanked 1 Time in 1 Post
|
|
Quote:
|
Originally Posted by torusturtle
2. Option - Leave the forward value empty
- Add the following into the Apache Directives field:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC]
RewriteRule ^/(.*)$ /sub/$1 [L]
|
1. ok
2. need a admin, reseller or customer can't.
so i need to give admin access for all customer ?
Quote:
|
Originally Posted by madmucho
Will be very happy when someone integrate this to co-domain and that is created automaticaly if user want (radiobutton or something similiar).
|
i agree with you.
Last edited by H2SO4; 2nd August 2007 at 22:24.
|

27th July 2007, 16:09
|
|
Member
|
|
Join Date: Jul 2006
Posts: 74
Thanks: 10
Thanked 2 Times in 1 Post
|
|
that works well, thanks!
|

31st July 2007, 13:55
|
|
Member
|
|
Join Date: Jun 2006
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
In ISPConfig
You can write the directive in:
Site > Basis > Apache Directives (Optional):
|

2nd August 2007, 22:29
|
|
Junior Member
|
|
Join Date: May 2007
Posts: 18
Thanks: 6
Thanked 1 Time in 1 Post
|
|
Quote:
|
Originally Posted by kanour
You can write the directive in:
Site > Basis > Apache Directives (Optional):
|
you can write with admin access only.
|

21st April 2008, 09:57
|
|
Junior Member
|
|
Join Date: Apr 2008
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
When I add this:
Quote:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC]
RewriteRule ^/(.*)$ /SubFolder/$1 [L]
|
It acts as if there is a normal forward (using the ispconfig panel).
http://www.domain.tld/SubFolder/
If I add this:
Quote:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC]
RewriteRule ^/(.*)$ /SubFolder/$1 [L,R=302]
|
or this
Quote:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC]
RewriteRule ^/(.*)$ /SubFolder/$1 [L,R=301]
|
It gives me this result:
http://sub.domain.tld/SubFolder/SubF...der/SubFolder/...
|

21st April 2008, 15:55
|
|
Senior Member
|
|
Join Date: Apr 2006
Posts: 287
Thanks: 18
Thanked 17 Times in 12 Posts
|
|
The subdomain and the folder must have the same name:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mortimer.domain.tld [NC]
RewriteRule ^/(.*)$ /mortimer/$1 [L]
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 08:59.
|
Recent comments
23 hours 55 min ago
1 day 3 hours ago
1 day 5 hours ago
1 day 14 hours ago
1 day 15 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 18 hours ago
1 day 22 hours ago
2 days 3 hours ago