In htaccess is there a way to do 301 redirects for individual pages for just one domain? I have multiple domains that go to the same directory so I dont want to interfere with any pages for any other domains except this one.
Indeed! That’s a great place for it but you can’t “aim” it at any specific domain - it’s hierarchical in that it works for that directory and every sub-directory. Good point, though, as IF the domain in question is a subdomain of the main domain, it can alter the Error Document for its directory/domain with the result that only it will be affected (as Sillysoft asked).
ErrorDocument is a CORE feature of Apache so, to implement such, you’d need access to the VirtualHost section of that domain to make that work.
Of course, you COULD implement your own 404 scheme using mod_rewrite (it’s not a lot of effort but certainly more than using ErrorDocument) and implement different 404’s for each domain.
Great, thanks! Worked like a charm. Have another quick question relating to this, can I do the 404 redirects per site? Currently Im using this for all sites:
ErrorDocument 404 /
But I only want to use it for a specific site. Can that be done and how?