Redirect a subdomain to the main domain - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: Redirect a subdomain to the main domain (/thread-7748.html) Pages: 1 2 |
Redirect a subdomain to the main domain - snoopy74 - 09-03-2009 10:40 PM Again hello :o) Creating a subdomain for an account, i have to specifiy a special directory. Now one of my customers wants to receive all requests to a subdomain on his main domain: sub.test1.com > test1.com Without changing the URL to "test1.com". Is there a possibility with .htaccess ? I already tried: Code: RewriteEngine on Code: RewriteEngine on Code: RewriteEngine on All without success. RE: Redirect a subdomain to the main domain - Blondak - 09-04-2009 12:29 AM did you try Code: RewriteEngine on ? RE: Redirect a subdomain to the main domain - snoopy74 - 09-04-2009 01:14 AM Code: RewriteEngine on btw: Wouldn't that way not disturb my URL / request host ? Another form of my question: Is it possible to use the sources from "www.test1.com" for all requests for "sub.test1.com" without visible changes in the URL ? My customer installed WordPress and changed it for multi-domain-support (Doc from http://www.yourhelpcenter.de/2009/03/wordpress-mehrere-domains-mit-einer-wp-installation/). Now he did not want to install WP on all subdomains and support all those copies. RE: Redirect a subdomain to the main domain - Blondak - 09-04-2009 01:37 AM (09-04-2009 01:14 AM)snoopy74 Wrote: strange, I test it and works for me, but i think, that you can set directory to same as main domain. RE: Redirect a subdomain to the main domain - snoopy74 - 09-04-2009 02:05 AM (09-04-2009 01:37 AM)Blondak Wrote: strange, I test it and works for me, but i think, that you can set directory to same as main domain. No, it's not possible. Error message from ispcp: "Mount point already in use!" Any other ideas ? RE: Redirect a subdomain to the main domain - snoopy74 - 09-05-2009 09:37 PM Nobody ? RE: Redirect a subdomain to the main domain - joximu - 09-05-2009 10:06 PM Hi snoopy74 normally all subdomains (subx.domain.tld) are handled by the main domain (because the apache config has a "ServerAlias *.domain.tld" - so you don't need an extra entry for them. (Well, then http://www.subx-domain.tld does not work - but I think this is not needed). Otherwise I often set / as sub-older - and then the subdomain is the same as the main domain (just take care when deleting the subdomain - I don't know if the folder is removed... :-) :-) /J RE: Redirect a subdomain to the main domain - kilburn - 09-06-2009 11:08 AM Quote:Is it possible to use the sources from "www.test1.com" for all requests for "sub.test1.com" without visible changes in the URL ? There is one really easy way, but it must be done as an admin because it involves filesystem fiddling: Code: rm -rf /var/www/virtual/domain.tld/subdomain/htdocs RE: Redirect a subdomain to the main domain - joximu - 09-07-2009 04:53 AM ... or symlink... RE: Redirect a subdomain to the main domain - kilburn - 09-07-2009 10:27 AM *owned* |