Forum Moderators: phranque
what i'm interested in doing is if a person tries browsing for a directory that does not exist eg. www.mywebsite.com/foobar/
i would like the server to figure this out and parse the request in a different file on www.mywebsite.com/account/index.php.
if would also like to keep the path that the user tried finding so /foobar/ part will still stay in the url but proccessed by the /account/ page.
Can anyone help me with this i'm totally stumped.
However, you can use mod_rewrite and check for directory or file exists, and then rewrite those requests to your catch-all.
Alternately, you can specify your 404 error page as an error-handling script using ErrorDocument.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim
if someone entires mywebsite.com/paul/ i wouldnt' want it to change to something like mywebsite.com/404.html. it should still stay as /paul/. from there i can determine if the profile exists or not and take appropriate action.