#1  
Old 19th May 2009, 23:52
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default Co-domains rewrite engine

Hi guys,

i know that there are like a thousand threads about this, but i still don't get it

I want to have a few co-domains that are redirected to a directory within my /web.

For example, i've got the domain www.domain.tld and i've just created test.domain.tld in the co-domain section of that domain in ispconfig.
Now i've created a .htaccess file in the root of my website and entered the following lines in there:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^test\.domain\.tld [NC]
RewriteRule ^(.*)$ http://www.domain.tld/test$1 [R]

This works. BUT, i don't want people to see the www.domain.tld/test in their address bar, i just want them to see test.domain.tld.

Is there a way to do this?

Thanks alot!
Reply With Quote
Sponsored Links
  #2  
Old 20th May 2009, 08:12
Zandooy Zandooy is offline
Junior Member
 
Join Date: May 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having a similar problem. Links on pages within the co-domain are redirecting to the master domain and its sub-folders. Co-domains with links are supposed to link to the Co-domain and its sub-folders.

What I get:
sub.domain.tld with a link to something.html in the same folder redirects to
domain.tld/subdomain/something.html instead of
sub.domain.tld/something.html

This shouldn't work this way. What is the problem?
Reply With Quote
  #3  
Old 22nd May 2009, 16:37
trcinc1 trcinc1 is offline
HowtoForge Supporter
 
Join Date: Nov 2006
Location: New Mexico
Posts: 18
Thanks: 2
Thanked 2 Times in 2 Posts
Default co-domain

If I understand your question corretly - Try this:

Drop this in your Apache Directives (Optional) section (under IPS Site):

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\.yourdomain.com(:80)?$
RewriteRule (.*) /%1/$1 [L]
Reply With Quote
  #4  
Old 22nd May 2009, 17:24
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

Quote:
Originally Posted by trcinc1 View Post
If I understand your question corretly - Try this:

Drop this in your Apache Directives (Optional) section (under IPS Site):

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\.yourdomain.com(:80)?$
RewriteRule (.*) /%1/$1 [L]
What should this do exactly? I've implemented it like you said and adjusted it to fit to the correct domain, but it doesn't do anything..
Reply With Quote
  #5  
Old 22nd May 2009, 21:39
Zandooy Zandooy is offline
Junior Member
 
Join Date: May 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default Nada

Quote:
Originally Posted by trcinc1 View Post
If I understand your question corretly - Try this:

Drop this in your Apache Directives (Optional) section (under IPS Site):

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\.yourdomain.com(:80)?$
RewriteRule (.*) /%1/$1 [L]
I suppose I am saying that the redirect should show up as
http://sub.domain.com/index.php
instead of
http://domain.com/subdomainfolder/index.php
in the address bar.

Those apache directives don't seem to change anything. I think you might have pointed me in the right direction though. I will look into how to use apache directives better and see if I can't come up with something that works.

NEW INFORMATION:
I just found some useful information on this problem. I tried it out and it works for me. This should help you jorizzzz because it solved my problem. http://www.howtoforge.com/forums/arc...p/t-12783.html


.

Last edited by Zandooy; 23rd May 2009 at 13:02. Reason: New Information
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
Web Hosting Only For Individual Domains bails Installation/Configuration 2 19th August 2008 16:35
Is there a Script to add Multiple Domains (websites) to ISPCONFIG??? bpmee Programming/Scripts 2 23rd February 2007 01:33
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs k1piee HOWTO-Related Questions 14 1st October 2006 13:46
Drupal and Apache Rewrite Rules andre Server Operation 10 4th May 2006 21:04


All times are GMT +2. The time now is 18:38.


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