$ _ SERVER: why can't I disable index because url rewriting fails. after some php host URLs are overwritten, $ _ SERVER [PATH_INFO] will disappear and replaced by $ _ SERVER [ORIG_PATH_INFO]. as a result, indexes will be removed based on the $ _ SERVER [PATH_INFO] judgment. php will expire. I only found this phenomenon, but I don't understand why? ----- $ _ Server problem. Why can't I disable index. php if url rewriting fails?
After some host URLs are rewritten
$ _ SERVER ['path _ info'] will disappear,
Instead
$ _ SERVER ["ORIG_PATH_INFO"]
As a result, the removal of index. php will become invalid based on $ _ SERVER ['path _ info '].
I just discovered this phenomenon, but I don't understand why?
------ Solution --------------------
PATH_INFO is missing but ORIG_PATH_INFO is there with the information PATH_INFO was supposed to have.
So the php code had to be changed to check for $ _ SERVER ['orig _ PATH_INFO '] when $ _ SERVER ['path _ info'] is absent
See the last section of http://www.binarytides.com/path_info-orig_path_info-apache-and-php/