Correct me if I'm wrong, oh learned ones, but it seems to me like you'd be correct in using a custom 404 page. One way of redirecting (may favourite but others may disagree) is by using <meta> HTML tags. Specifically, it would look like this:
<META http-equiv="refresh" content="time;URL=URL">
Where time (the first content argument) is the time after the page loads, in seconds, to redirect the user, and URL, of course, being the URL of the webpage to redirect to. Also, subdomains are usually also linked to folders in the HTTP root of your website... meaning if a user tries to get to http://sub1.yourdomain.com it would be the same as trying http://yourdomain.com/sub1 .
So in short, use $SERVER to find the bogus directory being accessed, pass it through your redirection mechanism (probably attaching it to the URL as a query with ?), and ta-da!
Hope that helps some... and somebody correct me if I'm wrong
~Fred
|