Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I was wondering what is going to be the easiest way to do the following;

Point wibble.site1.com to site2.com/directory/

So that wibble.site1.com/index.php will read from site2.com/directory/index.php

Any guidance would be greatly appreciated, pretty much everything I have found online helps you jump around within your own domain or gets you to the root of another domain.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If you have access to wibble.site1.com and if its server is Apache, you could a .htaccess with this :

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} ^wibble\.(.+)$ [NC]
  RewriteRule ^(.*)$ http://site2.com/directory/$1 [R=301,L]
</IfModule>

It should work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.