admin管理员组文章数量:1327972
Basically, I have a website built that has two components. One component is the the WordPress part, under "/". And the second component is a Symfony app under "/foo". How can I make Word-press ignore the "/foo" route and redirect that to the Symfony app?
I assume that I have to use an .htaccess file to accomplish (website will run on Apache) this, but I am not too well-versed in the syntax.
Helpful Info:
- Wordpress Version 4.8 Symfony Version 3.3 Apache 2.4
Basically, I have a website built that has two components. One component is the the WordPress part, under "/". And the second component is a Symfony app under "/foo". How can I make Word-press ignore the "/foo" route and redirect that to the Symfony app?
I assume that I have to use an .htaccess file to accomplish (website will run on Apache) this, but I am not too well-versed in the syntax.
Helpful Info:
- Wordpress Version 4.8 Symfony Version 3.3 Apache 2.4
- Is my assumption right that you don't have an index.php file in your /foo directory? Maybe you add one redirecting to to app.php and it should work out of the box without any htaccess or other modifications. – chrisbergr Commented Mar 7, 2019 at 22:50
1 Answer
Reset to default 1Update your .htaccess in WordPress root folder with below code
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /foo
RewriteRule ^/foo/app\.php$ - [L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
本文标签: wp adminHow can I make Wordpress work with a Symfony app
版权声明:本文标题:wp admin - How can I make Wordpress work with a Symfony app? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742252255a2440980.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论