Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Mod_rewrite solution if you tried everything
  • Hello everyone.
    My name is Kristjan and I'm testing fuelphp out for the first time(yes I'm a former CI fan).
    I just wanted to share this code since I had problem myself finding the right solution(that worked for my server) to remove index.php.
    Here is my solution: IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/?/$1 [L]
    /IfModule> You have to put < in front of IfModule both in the beginning and in the end since the forum always takes it out otherwise.
    I hope this can save someones 15-30 minutes.
    Have a nice day!
    Kristjan
  • Do you also set
    'index_file' => false
    in the config file? I'm getting a problem were all my redirects are still including the index.php, but when I set index_file to false in the config my site won't route properly anymore. Any ideas on how to remove the index.php from redirects?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion