Search code examples
phpfat-free-framework

how to redirect index.php in fat-free framework


I re-wrote my old app in fat-free framework. Everybody who used this app have bookmark http://www.domain/app/index.php This url now does not work in F3. Can I redirect index.php to http://www.domain/app/ ? Thanks.


Solution

  • You can define the redirection at the framework level:

    • either in your index.php file:
    $f3->redirect('GET /index.php','/');
    
    • or in your config file:
    [redirects]
    GET /index.php = /