RewriteRule in Apache with Symfony2 not removing app.php

前端 未结 7 1997
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 15:34

I have the following .htaccess file in my web directory for my Symfony2 installation:


    RewriteEngine On
    RewriteCond %{R         


        
7条回答
  •  無奈伤痛
    2020-12-13 16:17

    When you write RewriteCond %{REQUEST_FILENAME} !-f you say "Don't change real files... they should still be reachable." If you remove that, it should work.

    The reason for it allowing that is some frameworks let you use http://site.tld/script.php/abc=123&def=456 style of links.

    If you want it to allow filenames except app.php, you could add that as another RewriteCond.

提交回复
热议问题