Dyanmic Subdomains and 404 Not Found errors

Discussion in 'Site & Server Administration' started by Tesseract, Jan 17, 2009.

  1. #1
    I have a site where I use dynamic subdomains but want it where if there is a 404 I want the viewer to go to the subdomain's main page, rather than the main 404 for the whole site (which is currently happening).

    Example:
    Site = www.XYZ.com
    Dynamic Subdomain = aaa.xyz.com

    If someone types in aaa.xyz.com/error.html (which doesn't exist) they go to www.XYZ.com/404.html
    I want them to go to aaa.xyz.xom/404.html

    For non-dynamic subdomains I know how to do that with .htaccess, but I don't know how for dynamic pages.

    Any method?
     
    Tesseract, Jan 17, 2009 IP