I've the setup below a simple URL rewrite setup having a test setup

// ----- test.php -----
<?php

phpinfo();
// ----- test.php -----

The config for test.local is really as below.

<VirtualHost *:80>
        ServerName test
        ServerAlias test.*
        DocumentRoot /var/www/test
</VirtualHost>

<Directory "/var/www/test/">
        RewriteEngine On
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule .* test.php/$0 [R,NE]
</Directory>

If I create a request GET http://test.local/my-path-info the default phpinfo() page seems not surprisingly, basically add slash within the path info, that actually works too. But when I add an encoded forward slash %2F in to the URL (example GET http://test.local/my-path-info%2fsomething-else), it pops up as 404 Not found. Essentially it does not arrive at the php file.

Any idea why this really is happening, and just how to obtain around it?

The setup is on Apache 2.2.13, PHP 5.3.8 on Linux (Centos 5.x).

NOTE: Things I am attempting to do here's to include a forward slash into among the path-info components, so that it does not get construed through the router logic within an MVC framework. Without encoding it, the router cannot differentiate from a slash that's a path separator and also the one that's a part of a path component.

Due to the apache version that does not support NoDecode being an choice for AllowEncodedSlashes, I wound up while using below combination. I additionally needed to double url-scribe the request URI. Not ideal but works best for me for now.

<VirtualHost *:80>
        ServerName test
        ServerAlias test.*
        DocumentRoot /var/www/test
        AllowEncodedSlashes On
</VirtualHost>

<Directory "/var/www/test/">
        RewriteEngine On
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d

        # Option B below was the key!
        RewriteRule .* test.php/$0 [R,NE,B]
</Directory>