Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Router::get() returns url prefixed with 'index.php'
  • Hi, I am using a named route called 'login' and when I call Router::get('login'), I get a url back that's not friendly, as it contains 'index.php/...'
    for example: https://www.example.com/index.php/auth/login
    I was expecting https://ww.example.com/auth/login I have a similar issue when I use Response:redirect(), I can see that same format in the url in my browser. Any idea what the issue is?
    My routes.php config file is: <?php
    return array(
    '_root_' => 'welcome/index', // The default route
    '_404_' => 'welcome/404', // The main 404 route
    'parent/discover/discover' => 'applications/discover',
    'hello(/:name)?' => array('welcome/hello', 'name' => 'hello'),
    'auth/login' => array(array('GET', new Route('auth/loginshow')), array('POST', new Route('auth/login')),'name' => 'login'),
    );
    thanks.
  • that fixed it, thanks a lot!
  • Have you set your application config file correctly?
    /**
      * index_file - The name of the main bootstrap file.
      *
      * Set this to false or remove if you using mod_rewrite.
      */
     'index_file'  => false,
    

Howdy, Stranger!

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

In this Discussion