'ello all.
What is the easiest way to handle special (see example) URL's when using PHP as a CGI binary?
linkexample
http://sub.domain.example.co.uk/site/dir/inv.php/1/2/3/4
I have found that Apache will automatically route traffic to "inv.php" by default without the need for mod_rewrite on Linux. When PHP's SAPI is CGI, mod_rewrite is required.
I've found this regex to be close, but it does not fully take subdirectories into account. I am looking to take everything after "inv.php" and put it like so: inv.php?vars=/1/2/3/4
RewriteRule ^(.*)[\x2F]([^\x2F]+)(.*) $1/$2?vars=$3
Furthermore, if I could please get the assistance, I have noticed that the following conditions are required for mod_rewrite
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{REQUEST_FILENAME} !-d
How can this be changed into an IIS compatible condition? I haven't been able to find information like "test if file exists"
Hope that all makes sense.
TIA!