CMS page URLs without any prefix

Hello there!

I want to run my CMS pages URLs without any prefix like /i/:slug. I have changed in the router’s index.js file. but then my product pages don’t work. What if I want to run Cms pages and Product pages both without adding any prefix in the URL?

Hello @Dhruvi

Actually there are no any feasible solution for the use both URL openly without any prefix.
So, Either you have to add prefix in product URL’s either in CMS pages

Because once URL is hit in browser, VSF finding the ROUTE for that URL and founded two route so, It’s appear first one only.

Hi there, from 1.9 on you might want to use urlDispatcher for this. You can override the url/mappingFallback action to resolve any type of entity from any URL you have.

Check out this module

Hi @Dhruvi
I think you should make new route in index.js (src/themes/default/router)
for ex:
const CustomCMS = () => import(/* webpackChunkName: “vsf-customcms” */ ‘theme/pages/CustomCMS.vue’)
{ name: ‘custom-cms’, path: ‘/customcms’, component: CustomCMS }