![]() |
Routing and $_SERVER['SCRIPT_NAME'] removal - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: Routing and $_SERVER['SCRIPT_NAME'] removal (/showthread.php?tid=73114) |
Routing and $_SERVER['SCRIPT_NAME'] removal - qwertyman - 03-20-2019 Hi, I have a website built using CodeIgniter 3.1.9. I have Apache configured with the following RewriteRule as recommended here https://www.codeigniter.com/userguide3/general/urls.html#removing-the-index-php-file so that the index.php part of a url is optional. Code: RewriteEngine On I noticed that the following url: www.example.com/index.phptest loads the same page as www.example.com/index.php/test. I had a look through the routing code in core/URI.php and saw that the following code was responsible: Code: ... I replaced this code with the following to fix the issue: Code: ... Additionally, I checked out a list of sites that use CodeIgniter and found the following with the same issue: **links redacted** RE: Routing and $_SERVER['SCRIPT_NAME'] removal - InsiteFX - 03-26-2019 If you think this is a bug then you need to report it on Github. You should never ever edit and change CodeIgniter system files. |