Actually I have a domain – domainone.com
I have created a subdomain cname of anoter domain as
abc.domaintwo.com – CNAME as – domainone.com
so that I can use the js and css files e.g domainone.com/js/jquery.js files as abc.domaintwo.com/js/jquery.js
SO Far everything is FINE, no issues at all.
Problem:
I have a custom 404 page for domainone.com and now when that abc.domaintwo.com goes 404 same page appears which i don’t want. Any help is appreciated.
Htaccess of domainone.com:
ErrorDocument 404 /404/
All i want is to have different 404 for both…..
Notes: Don’t have access to shell for symlinks or alias as I am on shared hosting.
For what you are trying to do, you will need to use PHP. It cannot be done in your .htaccess. The ideal place would be the virtual hosts file, but sounds like you don’t have access.
You should separate the web roots apart from each other, and then mod rewrite:
This should redirect http://abc.domaintwo.com/js/* and css/* to http://www.domain.com/js and css/
Note: it is untested, but should work if my memory serves correctly.