you should know, if you switch from php cgi to php fastcgi, you have to change the errormod too, because it is explicit told, to use the php cgi exe.

you have the normal 404 behavior, which means, this only is used, if the requested file doesn’t exist.

What i dont know is how it performs on many requests, because it first try to find the file on the path.
Maybe someone other could say, how much the performance impact is related to normal rewrite

2011/3/23 Ludovic Demblans <l.demblans@laposte.net>

Ok, works for me too.

Thank you very much.

Have you faced some issues i should be told with this solution ?

Ludo


2011/3/22 Ludovic Demblans <l.demblans@laposte.net>

Hi,

I have some php scripts who parse the $_SERVER['REQUEST_URI'] variable to
figure what they have to do.
We use URLs like /users/me/profile/edit and not
/edit_my_profile.php?user=me

I wrote a small rewriter :

(colorful version: http://pastie.org/1701271 )

but i would like $_SERVER['REQUEST_URI'] to be "/users/me/profile/edit"
and not "/index.php?"

... autosnip ...
Hi Ludovic,

i go a slightly other way for this task. I Use a 404 errormod and direct all
requests in it to index.php


-module(arbit_404_handler).

-include("yaws/include/yaws.hrl").
-include("yaws/include/yaws_api.hrl").

-export([out404/1,
    out404/3,
         crashmsg/3]).

out404(Arg) ->
    out404(Arg, get(gc), get(sc)).
out404(Arg, GC, SC) ->
    yaws_cgi:call_cgi(Arg, GC#gconf.phpexe,  lists:flatten(Arg#arg.docroot)
++ "/index.php").

crashmsg(_Arg, _SC, L) ->
    {ehtml,
     [{h2, [], "Internal error, yaws code crashed"},
      {br},
      {hr},
      {pre, [], L},
      {hr}]}.

it is not the best solution, but it works good for me


--
Utilisant le logiciel de courrier révolutionnaire d'Opera : http://www.opera.com/mail/