11-07-2008, 08:11 PM
[eluser]wiredesignz[/eluser]
This custom .htaccess setup allows you to use uri segments and query strings together and may fix the issue everyone seems to have running CI on PHP-CGI hosting.
The great thing is that CI allows us to use a custom defined uri protocol. (thanks Rick Ellis)
If you want to try this setup then read on.
Set your custom uri protocol in application/config.php
Create your .htaccess file like so
You should be good to go. Good luck.
Credit goes to the folks @ TinyMVC forum for this solution.
This custom .htaccess setup allows you to use uri segments and query strings together and may fix the issue everyone seems to have running CI on PHP-CGI hosting.
The great thing is that CI allows us to use a custom defined uri protocol. (thanks Rick Ellis)
If you want to try this setup then read on.
Set your custom uri protocol in application/config.php
Code:
$config['uri_protocol'] = "APP_PATH";
//enable query strings if required.
$config['enable_query_strings'] = TRUE;
Create your .htaccess file like so
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:REDIRECT_APP_PATH} !^$
RewriteRule ^(.*)$ - [E=APP_PATH:%{ENV:REDIRECT_APP_PATH}]
RewriteCond %{ENV:APP_PATH} ^$
RewriteRule ^(.*)$ - [E=APP_PATH:/$1]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
You should be good to go. Good luck.
Credit goes to the folks @ TinyMVC forum for this solution.