O
Oldperl
Guest
Greetz from germany @all and please excuse my bad english
the problem: I'm installing several domains in Plesk 7.5.x and wanted a kind of preview for my customers, so they only have to type something like http://xx.xx.xxx.xx/domain.tld/ into browser. I searched the forum for hours and also the manuals, but no solution.
the goal: just to change one thing and then it has to work for all.
the solution:
1. I set one domain as default. http://forum.sw-soft.com/showthread.php?threadid=25683
2. I wrote a vhost.conf file for that, and only for that domain.
ad:stupid forum, it has stolen a backslash in code
so here the code without PHP-quote. Hope that works. Btw, must be a bug of forumsoftware, because the parser also don't recognize \\, normaly that works in PHP, oh well
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(/(.)+\.de)$ $1/ [R]
RewriteRule ^(/(.)+\.de)(/.*) /home/httpd/vhosts$1/httpdocs$3
# looks for domain.tld (here .de)behind IP and points to the right directory
<IfModule>
The first Rewriterule checks for the / at the end, so you can write http://xx.xx.xxx.xx/domain.de or http://xx.xx.xxx.xx/domain.de/
The second rule takes all behind http://xx.xx.xxx.xx and also check for .de in that string. Normaly you don't have directorys like MyDomain.de
hint: if you want to use this for other .tld's just copy the to rules and change .de to what ever you want
3. I put the vhost.conf file in the /conf directory of the default domain and installed it ==> http://download1.sw-soft.com/Plesk/Plesk7/Doc/html/plesk-7-advanced-features/ch06.html
4. Now i restarted the apache server and then tried to reach my second domain http://xx.xx.xxx.xx/domain2.de
It works fine. Now i can start to setup my other domains, testing them and at least register them, without changing something in setup of new domains.
Hope that will save your time
regards
Oldperl
the problem: I'm installing several domains in Plesk 7.5.x and wanted a kind of preview for my customers, so they only have to type something like http://xx.xx.xxx.xx/domain.tld/ into browser. I searched the forum for hours and also the manuals, but no solution.
the goal: just to change one thing and then it has to work for all.
the solution:
1. I set one domain as default. http://forum.sw-soft.com/showthread.php?threadid=25683
2. I wrote a vhost.conf file for that, and only for that domain.
PHP:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(/(.)+\.de)$ $1/ [R]
RewriteRule ^(/(.)+\.de)(/.*) /home/httpd/vhosts$1/httpdocs$3
# looks for domain.tld (here .de)behind IP and points to the right directory
<IfModule>
ad:stupid forum, it has stolen a backslash in code
so here the code without PHP-quote. Hope that works. Btw, must be a bug of forumsoftware, because the parser also don't recognize \\, normaly that works in PHP, oh well
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(/(.)+\.de)$ $1/ [R]
RewriteRule ^(/(.)+\.de)(/.*) /home/httpd/vhosts$1/httpdocs$3
# looks for domain.tld (here .de)behind IP and points to the right directory
<IfModule>
The first Rewriterule checks for the / at the end, so you can write http://xx.xx.xxx.xx/domain.de or http://xx.xx.xxx.xx/domain.de/
The second rule takes all behind http://xx.xx.xxx.xx and also check for .de in that string. Normaly you don't have directorys like MyDomain.de
hint: if you want to use this for other .tld's just copy the to rules and change .de to what ever you want
3. I put the vhost.conf file in the /conf directory of the default domain and installed it ==> http://download1.sw-soft.com/Plesk/Plesk7/Doc/html/plesk-7-advanced-features/ch06.html
4. Now i restarted the apache server and then tried to reach my second domain http://xx.xx.xxx.xx/domain2.de
It works fine. Now i can start to setup my other domains, testing them and at least register them, without changing something in setup of new domains.
Hope that will save your time
regards
Oldperl