Remove index.php from url by htaccess

前端 未结 4 1243
时光取名叫无心
时光取名叫无心 2020-12-22 12:31

Im developing a php frame work and I am new to .htaccess rules. So I need to redirect url using .htaccess. Url is

http://localhost/rinocabs/index.php?/Galar         


        
4条回答
  •  醉酒成梦
    2020-12-22 12:56

    Please try below code :

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    

提交回复
热议问题