最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

rest api - WordPress + Vue — Single page app giving me 404s when I use query params

programmeradmin2浏览0评论

I've got my rest api powered site working really well with Vue. Except for the issue of WordPress and urls.

Site: /

Search for a name or click on a name and the url updates. Now refresh the page. Everything still works, in that Vue will take over and do all the requests and set things up. But I'm getting a 404 on every page like that.

I don't really know anything about this whole thing. I tried setting up a redirect plugin but that does what it says — it redirects from /&page=1&search=John%20Doe back to , which isn't what I want.

I basically want WordPress to ignore the urls completely — just have index.php (and hence Vue) takeover everything. Basically, not 404 and just pass on through with the url.

I'm not currently using Vue Router at all in my app — just appending query strings and using popstate. I'm wondering if I actually need to be using Vue Router to handle this.

发布评论

评论列表(0)

  1. 暂无评论