.htaccess configuration and index.php remove solution |
[eluser]Unknown[/eluser]
Hi. After many days searching for a good and workable .htaccess configuration i found this one that works fine. I donĀ“t know if it's the perfect solution but works for me: RewriteEngine On RewriteBase /ci/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L][/color] 1) I have CodeIgniter installed like this: http://www.mydomain.com/ci 2) .htaccess file is installed at /ci directory. If you change this file in your computer remember that you must save it with ANSI encoding. You can use NotePad for example. 3)In system/application/config.php i have this: $config['base_url'] = "http://www.mydomain.com/ci/"; $config['index_page'] = ""; 4) I notice also that i had to remove another .htaccess that i had at root directory (http://www.mydomain.com). Maybe a conflict. If you want install CodeIgniter at root directory you only have to put this configuration in your .htaccess and save it in this root directory: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L] I have a shared hosting account in a linux server with PHP5, APACHE 1.3.37 and mod_rewrite module enabled. Is nothing new what i wanted to help but is another contribution about this theme that i think makes your head crazy like mine |
Welcome Guest, Not a member yet? Register Sign In |