Symfony Ignore Directory in web/

喜你入骨 提交于 2019-11-30 16:34:24

Ok. I figured it out. The .htaccess of the sub directory also needs to be modified.

In web/.htaccess use:

RewriteCond %{REQUEST_FILENAME} !-d

In the sub directory, web/other_app/.htaccess use:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /other_app/index.php [QSA,L]

This will work for wordpress and most any other php app that you want to run on a symfony site, but don't want to deal with trying to hack it into the framework.

Try adding:

RewriteCond %{REQUEST_FILENAME} !-d
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!