Page is a not externally linkable
jdMorgan - 1:21 pm on Nov 4, 2005 (gmt 0)
What does matter is that there's nothing in the code above that prevents requests for these files from being rewritten to your php script. So, you may be able to cure this problem simply by excluding these requests from being rewritten by adding something like: One thing that will help clarify this kind of problem for you is that it is the browser that resolves relative links on your pages to a canonical URL. So, if the browser sees a relative link on a page in one of your 'band' subdomains, it assumes that that link should be canonicalized to that subdomain. Since all of these subdomains actually resolve to the filespace of your main domain, that doesn't really matter, but unless your php script can handle the css and image requests, you won't want to rewrite these requests to the script. If you want to use canonical links to avoid this problem, you can. On the one hand, the URLs "look better" if they maintain the current subdomain path -- it looks better to the user. On the other hand, if you have any very large images and/or scripts that are used in all subdomains, and if your users tend to browse around in many subdomains, then there would be a small caching-related advantage to using canonical links on those resources, so that the client browser would know that it didn't need to re-fetch them when navigating to a page in a new subdomain. If you pursue a rewrite solution, be aware that RewriteRule cannot "see" the domain; You must use A RewriteCond testing %{HTTP_HOST} to test it or create a back-reference to it. Jim
Domains and subdomains don't exist inside your server, only directories and files, so it does not matter whether the images, css, etc. point to the subdomain or the main domain.
RewriteCond %{REQUEST_URI} !\.(css¦gif¦jpe?g¦png)$
to the beginning of the code.