Search code examples
php.htaccesshttp-redirectslim

PHP Slim framework : No input file specified?


This is my directory structure

 
/path/www.mysite.com/
    public_html/ 
        api/
            v1/
                index.php
                .htaccess


.htaccess Rule : 
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L] 

Issue :
When I navigate this url : http://technobuff.in/api/v1/hello this is not working. It shows 'No input file specified.' but If I use this : http://technobuff.in/api/v1/index.php/hello this is working fine.

I am using Slim Framework for my API development. In localhost, This was working good. Please help and explain me about it little.


Solution

  • Thanks to Bagus Tesa

    Just follow this link. .HTACCESS for Slim Framework

    Replace the content of .HTACCESS file with below content

    
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^ index.php [QSA,L]