I'm determining mod_rewrite rule which will rewrite all demands to my /application.php if asked for file not is available, and will not inflict spinning otherwise. It's easy:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule .* application.php [PT]

There's just one trouble with the code. Assume I've foo.html file. Then demands like:


will fall with 404 error. Why?

will fall with 404 error. Why?

Because that URL does not exist. It's searching for the file string within the folder /foo.html/some/other and it is not there.

The behavior that you would like to take advantage of while using http://example.com/foo.html/some/other/string URL structure - dealing with the very first entry like a file title, and also the relaxation like a parameter into it - is known as "pathinfo". It's nothing related to mod_rewrite, and can be accessible should you let the following inside your Apache configuration:

 AcceptPathInfo On

it appears like this setting is presently switched to "off" for you personally.

Should you enable it, the part following the file title is going to be open to foo.html - in PHP, it might be within the



As this method does not require rewrite module to become active, this really is sometimes known as "poor people man's mod_rewrite" - it really works fine, but is not as pretty as flexible as "real" spinning.