RewriteRule in Apache with Symfony2 not removing app.php

前端 未结 7 2005
佛祖请我去吃肉
佛祖请我去吃肉 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:14

    I had this problem today and the fix was to append a /$1 at the end of the url rewrite rule.

    My .htaccess looks like this:

    
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ app.php/$1 [QSA,L]
    
    

    And the virtual host is defines as this:

    
       DocumentRoot /var/www/html/symfony_site/web
       DirectoryIndex app.php
       
           AllowOverride All
           Allow from All
       
    
    

提交回复
热议问题