Я использую проект Vue в качестве темы Wordpress.Я создал простой маршрутизатор, но когда я включаю mode: 'history'
, я получаю пустой сайт.Я пытался настроить файл .htaccess
, но без эффектов.Мой проект находится в каталоге VueWP в каталоге XAMPP htdocs.С хешем все работает нормально.Где ошибка?
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /VueWP/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /VueWP/index.php [L]
</IfModule>
# END WordPress
Это мой VueRouter:
import Vue from 'vue';
import Router from 'vue-router';
import Main from '../Components/Main';
import ArticlePage from '../Components/ArticlePage';
import Page from '../Components/Page';
Vue.use(Router);
export default new Router({
mode: 'history',
routes: [
{
path: '/',
name: 'Main',
component: Main
},
{
path: '/post/:url',
name: 'ArticlePage',
component: ArticlePage
},
{
path: '/page/:url',
name: 'Page',
component: Page
}
],
});