Why does my `/ontdek/category` index page gives a forbidden?
Hi,
Why does my
/ontdek/category
index page gives a forbidden? Everything seems to work fine except my /ontdek/category/index.vue
this one gives a forbidden when I run yarn generate
.
My /ontdek
and /ontdek/category/slug
are working perfect.
Someone who sees what my mistake is?49 Replies
On localhost it works too, but not on my server.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yes I am
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ah how would you try to fix the htacces then?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Nice will try, thanks!
@dferderber What I see is that my public_html doesn't have a
/ontdek/cases/index.html
Created from the yarn generate
So that's my category
index
/ontdek/[category]/[slug]
where cases
is a category
So it should have an index.html right?Also see this: @dferderber
You see that in
/ontdek
you have my categories cases, media, nieuws
and an index.html
But in a category (cases) we don't have a index.html
Isn't there something wrong in my folder structure?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
But there is a [category] index.vue?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Hmm
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
@moderator someone?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I don't think you need to have a link to the page to be listed
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Jup
So will crawl everything without an url to it
So my question stays legit right?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Strange
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Jup
That looks fine indeed.
But when you have like 50+ categories
I guess you won't want to create a nuxtlink to every one of then
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Nope because the /ontdek/[category]/index indexes all the slugs in the category
which is in my case 2 pieces in /ontdek/cases/
There it has to list my 2 items in the category /cases/
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'll try to use breadcrumbs in my /slug/
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Maybe it will crawl them then
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Building it now
Will update you
Fixed it
So a small "hack" will be using breadcrumbs.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
But then you need to define it per category
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Not going to do that static per category haha
Should be enough if all are well-linked. The crawler will pick it up
How’d you mean?
routes: ['/ontdek/category1', '/ontdek/category2', '/ontdek/category3']
Like this, but still static?
Well as long as categories are linked on subpages and those subpages are linked (so you can build a "graph" from a static site to all the categories) it will be fine
Take for example https://www.chordatlas.com/
ChordAtlas
ChordAtlas - Your Piano Chord Database
ChordAtlas is a database for piano chords providing you detailed information to each chord and an interactive
piano chart to discover the different chord inversions. If you've asked yourself how to play a specific chord, ChordAtlas has the answer!
Yup, so the breadcrumbs option
Eventually, all pages are linked from some page
Breadcrumbs is one option indeed
but doesn't have to be
category pages are fine too, and a "category overview page"
Like e.g. https://www.chordatlas.com/chord-types
ChordAtlas
Chord type overview
ChordAtlas is a database for piano chords providing you detailed information to each chord and an interactive piano chart to discover the different chord inversions. If you've asked yourself how to play a specific chord, ChordAtlas has the answer!
(But nicer 😂 )
Isn’t that what I tried?
See my post
Category index, but doesn’t show
Is the category index linked somewhere too?
No but does a request to my cms
Which gets all my posts in that category
Well, it needs to be picked up somehow
so let's say you have /
/ links to /categories
/categories has a list of all /categories/<SLUG>
/categories/<SLUG> has a list of sub-categories (e.g. /categories/<SLUG>/<SUBSLUG>)
that would be fine
just as an example
Aahhhhh
Like that