Basically, I have a website built that has two components. One component is the the WordPress part, under “https://wordpress.stackexchange.com/”. 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
1 Answer
Update 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