how to config vuejs routing and wordpress as headless on a apache server
-
I want to use a wordpress CMS as backend for a vuejs router based site.
If I adapt the .htaccess file as in the documentation of vuejs, I can access my routes, i.e. open paths with defined content. simple catchall an redirect to the index.html oy my vuejs site
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>I can also open wp-admin without any problems, but the REST API stops working:
https://www.site.com/wp-json/wcra/v1/pagerecursive/?parentId=0
then the catchall runs https://www.site.com.
How can I ensure that the REST API call is processed by wordpress. How can Idefine a rule for wp-json?
- The topic ‘how to config vuejs routing and wordpress as headless on a apache server’ is closed to new replies.