I am trying to create an MVC structure when I notice that the variable $ _SERVER ['PATH_TRANSLATED'] does this:
[PATH_INFO] => / test / test2 / test3
[PATH_TRANSLATED] => redirection: /index.php/test/test2/test3/test2/test3
This is when I access the PHP file http: //domain.tld/test/test2/test3
Note how this repeats after / test /
This is my .htaccess to rewrite:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
Any ideas? I tried to change the RewriteRule rule, but nothing changed. The variable is not so important for what I'm trying to do, but I wonder why this happens, and if I have something incorrectly configured.
Server Information:
Apache / 2.2.3
PHP 5.3.1
Edit: This variable is not repeated in Lighttpd, as it reports:
[PATH_INFO] => / test / test2 / test3
[PATH_TRANSLATED] => / home / kramer / public_html / test / test2 / test3
So, I assume this has something to do with Apache. I also tried FastCGI under Apache and produced the same duplicate result.
source share