Removing index.php from the URL's |
Hello
I'm following the user guide included with Code Igniter and i'm trying to remove the index.php from the URLs just how it's pointed in the guide. I do this in the .htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] mod rewrite is enabled too, but it doesn't seem to work. Is something missing?
(09-05-2016, 03:42 PM)harry_ord Wrote: Hello This work's for me: Code: RewriteEngine on
Here we go again!
NOTE: If your html file is correct and you use the base_href parameter you do not need this line in your .htaccess file. Code: RewriteCond $1 !^(images|css|js|uploads|index\.php|robots\.txt) This line can cause you problems in your .htaccess file later down the road. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Code: $config['index_page'] = ''; Code: RewriteEngine On
Try changing the index.php line to this:
Code: RewriteRule ^(.*)$ index.php?/$1 [L] Depending on the version and configuration of Apache (and where you set the rule, and maybe a dozen other variables), you may need the question mark after index.php.
I made a fresh installation and i used the solution proposed by dimawebmaker and now i totally worked. Thanks!
Code: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] |
Welcome Guest, Not a member yet? Register Sign In |