1

I would like to display the contents of a subdirectory when someone hits a specific subdomain. http://my.example.us/ should show the content of http://example.us/sync.

EDIT: This is what I have so far. It doesn't appear to effect my URL at all.

RewriteCond %{HTTP_HOST} ^(my)\.example\.us$
RewriteRule ^ http://example.us/sync/$1 [L]
acedanger
  • 1,197
  • 2
  • 15
  • 34
  • What server software are you using? cPanel etc? – 472084 Jun 14 '12 at 15:32
  • 1
    Possible duplicate? [Rewrite sub-domain to directory](http://stackoverflow.com/questions/3413253/rewrite-sub-domain-to-directory) – Havelock Jun 14 '12 at 15:35
  • I'm using dreamhost. They don't use cpanel. They wrote their own from what I understand. I asked their support about this issue and they said they don't have anything that will do what I'm trying. – acedanger Jun 14 '12 at 15:36
  • @Havelock I promise I searched first! LOL. It does look like mine is a dupe. I'll check that one out. Thanks for the link! – acedanger Jun 14 '12 at 15:37
  • 1
    Just replace 'mirror' with 'map' or something similar and search again :) – Havelock Jun 14 '12 at 15:37
  • mod_rewrite will help redirect from one to another but you still need to create the sub domain. – 472084 Jun 14 '12 at 15:43
  • I've created the subdomain. I've tried a number of solutions I've found here on stackoverflow and other blogs but none of them are working for me. Do I put the `.htaccess` file in the root of the "main" URL directory or do I put it in the root of the new subdirectory? – acedanger Jun 14 '12 at 19:29

0 Answers0