traxxus Posted January 26, 2012 Report Share Posted January 26, 2012 Hi all I want to redirect an IP range to a subdomain. Idea:if someone goes to www.xyz.com they should be forwarded to intern.xyz.com The .htaccess code: RewriteEngine on RewriteCond %{REMOTE_ADDR} 192.168.1 RewriteRule ^(.*)$ http://intern.xyz.com/ [R,L] This doesn't work.... i don't know why. When this is enabled, the whole site doesn't work anymore. the .htaccess is in the main www folder. The folder structure is the following: -C:/Uniserver/www-/intern/ (this is DocumenRoot in the vhost file for subdomain intern.xyz.com) EDIT:Like everytime after posting; problem solved. All domains and subdomains has to be in separate folders, and NOT interleaved. like this:C:/Uniserver/www/-external (www.xyz.com)-intern (intern.xyz.com)-something (something.xyz.com) Quote Link to comment Share on other sites More sharing options...
BobS Posted January 26, 2012 Report Share Posted January 26, 2012 Yep.That's what the new Coral vhosts setup does for you, to some extent. You still need to be sure to specify the separate folders properly. Regards,BobS Quote Link to comment Share on other sites More sharing options...
traxxus Posted January 30, 2012 Author Report Share Posted January 30, 2012 Another question: If i delete a vhost in the coral admin-panel, the real folder is also deleted Is this true, or it's only a bad phase of the moon Quote Link to comment Share on other sites More sharing options...
Yoni Posted January 30, 2012 Report Share Posted January 30, 2012 Another question: If i delete a vhost in the coral admin-panel, the real folder is also deleted Is this true, or it's only a bad phase of the moon Read the prompt. It doesn't delete it unless you tell it to do so Quote <p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p> Link to comment Share on other sites More sharing options...
BobS Posted February 1, 2012 Report Share Posted February 1, 2012 Yoni's right. Be sure to read the prompt. It absolutely removes the directory if you tell it to do so! Sort of like "del *.*" Regards,BobS Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.