View Single Post

  #3 (permalink)  
Old 05-05-2008
Kees Nuyt
 
Posts: n/a
Default Re: apache configuration

On Mon, 5 May 2008 01:46:27 -0700 (PDT),
"celalo@gmail.com" <celalo@gmail.com> wrote:

>Hi all,
>
>I am pretty much a PHP developer and I have a new idea for my website.
>To implement the new idea I guess I need some basic configuration on
>apache.
>I have my index.php and everything runs depend on that file. Now I
>want to manage any other requests on root directory other than the
>index.php is handled.
>For example:
>for now, www.mydomain.com/index.php?foo=bar etc. works as expected
>but I want any other requests like www.mydomain.com/bla, www.mydomain.com/qwerty,
>www.mydomain.com/awsome, www.mydomain.com/danger are hadled somehow.
>I suppose there should be a solution like handling any requests "which
>is not handled as usual"
>for example if I have some php file in some directory like
>www.mydomain.com/somedir/somefile.php it should be run as expected but
>lets say if I don't have "thisfiledoesntexist" in my directory
>structure like www.mydomain.com/thisfiledoesntexist, this request
>should be handled by lets say another php script called www.mydomain.com/unhandled.php
>
>can you suggest anything?


You could try with the ErrorDocument directive:
ErrorDocument 404 /unhandled.php
ErrorDocument 404 http://www.mydomain.com/unhandled.php

>Cheers
>Baris


HTH
--
( Kees
)
c[_] Build a fire for a man and he will be warm for
a day, but set fire to that man and he will be
warm forever! (Sun Tzu) (#443)