CodeIgniter Forums
ForceType on Index page w/o ext does not work with _detect_uri in URI.php - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: ForceType on Index page w/o ext does not work with _detect_uri in URI.php (/showthread.php?tid=39439)



ForceType on Index page w/o ext does not work with _detect_uri in URI.php - El Forum - 03-10-2011

[eluser]Unknown[/eluser]
All;
Note: this worked in 1.7. Also use HMVC

please note, I use app.php instead of index.php. I have renamed index.php to app.php.

In my .htaccess I have an override
<Files app>
ForceType application/x-httpd-php
</Files>

This allows URLS such as http://localhost/app/{controll}/{method} instead of http://localhost/app.php/{controll}/{method}

However, after setting up a CI2.0 environment, this no longer works and I have traced it down to URI.php in core. I had originally thought this to be a HMVC issue, but it is not.

In a nutshell, when the .php is omitted the _detect_uri returns "app" and never gets to the default router. When using the .php extension it returns empty string and works as expected..

ideas? work-around?


ForceType on Index page w/o ext does not work with _detect_uri in URI.php - El Forum - 03-10-2011

[eluser]Unknown[/eluser]
If it helps any for ideas.. Changing the URI protocol has no impact and adding a route only will work to route the first (no controller/method specified) request.