WordPress and angular2 url routes not working

I am working on an angular2 application which is placed along with wordpress site. Following is the directory structure:

 app/ (angular2 app is placed under this folder)

htaccess file is placed under the html folder for wordpress url rewriting and another htaccess is placed under app folder for angular2 urls. I have updated htaccess file of wordpress to ignore urls under app folder but now urls of wordpress are not working and apache 404 is coming. Following is my htaccess file for wordpress:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} "/app/"
RewriteRule . index.php [L]

Read more here: WordPress and angular2 url routes not working

Leave a Reply

Your email address will not be published. Required fields are marked *