Not really an expert on htaccess. But i wrote a angular 2 app using wordpress administration & REST API services for running the backend. The problem I’m facing now is that i need to find the two together.

How would i go about binding all frontend requests to a static HTML file (angular 2), while still having /wp-json, /wp-login.php & /wp-admin working as usual? Currently my frontend is within a folder under my wordpress theme.

Just not quite sure how to make theses exceptions in the htaccess file for allowing backend routes still to pass through.

Default wordpress .htaccess is:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Read more here: Static frontend & wordpress backend using htaccess routing


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: