Jump to content
The Uniform Server Community

Subdomain redirect


traxxus
 Share

Recommended Posts

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Another question:

 

If i delete a vhost in the coral admin-panel, the real folder is also deleted :) :huh:

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 :)

<p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...