RewriteRule problem in codeigniter 2.0.2 |
[eluser]Le Tien Tam[/eluser]
I have site tree below root --|-- index.php --|-- .htaccess --|-- source ---------|----application ---------|----index.php ---------|----.htaccess .htaccess file in root: ############ RewriteEngine on RewriteRule ^vnmc-([^/]+)\.html?(.*)$ /source/home/html/$1 ############ .htaccess file in source: ############ RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] ############ home is my comtroller file and html is function controller and go: http://domain.com/vnmc-home.html?home It working ok with codeigniter 1.7.3 but in codeigniter 2.0.2 it show error 404. When i print $_SERVER below 404 error file [REDIRECT_QUERY_STRING] => /home/html/home [REDIRECT_URL] => /jetwi2/home/html/home [QUERY_STRING] => home [REQUEST_URI] => /vnmc-home.html?home But it ok when I go to direct link: domain.com/source/home/html Please show me the way... How i can use RewriteRule in CI 2.0.2 like CI 1.7.3
[eluser]InsiteFX[/eluser]
Did you modify your index.php file to point to your system and application folders? InsiteFX
[eluser]Le Tien Tam[/eluser]
course because it ok when I go to direct link: domain.com/source/home/html and I can visit all link with direct link domain.com/source/controller/method
[eluser]Le Tien Tam[/eluser]
I found it. In the config.php we have to set $config['uri_protocol'] = 'QUERY_STRING'; and only QUERY_STRING Default value is AUTO? Why don't 'AUTO'? |
Welcome Guest, Not a member yet? Register Sign In |