Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subdomains, .htaccess, and sharing directories



Hi,

I'm having trouble "sharing" the same folders in the main (www.mydomain.com) domain with the sub (sub.mydomain.com) domain. Here is what is happening. I put a file in a directory as such:

http://www.mydomain.com/css/main.css

When a file that uses that css file is called within the www.mydomain.com domain, everything works great. But when I call a file that is within a subdomain such as:

http://sub.mydomain.com/index.php

that uses the main.css file above, it can't find it.

My subdomain is pointing to a directory within the main domian as such:

www ---> subdomian_folder

If I use the following url to get to the same file:

http://www.mydomain.com/subdomain_folder/index.php

everything works fine.

Here is what I have in the .htaccess file, but it's not working.

RewriteRule ^(www|sub)\.mydomain\.com/(css|images|js)/ http:// www.mydomain.com/$2

Any help would be appreciated.

Thanks very much,

Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.