Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Index in subfolder adds trailing slash with different canonical url

Started by Rud 6 years ago · 1 replies · 1209 views
6 years ago

Hi, I have installed grav in a folder (mainsite/grav-subfolder) to host a blog for the main site. Now the problem is that when trying to access mainsite/grav-subfolder the system performs a 301 redirect to mainsite/grav-subfolder/, however the canonical url for the page seems to be mainsite/grav-subfolder. This seems to create a number of SEO issues. I can't seem to find where to remove that 301 rule, can anyone point me in the right direction?

Here's the actual link

Thanks

6 years ago

Hi @rud, welcome to the Grav forum.

This is a tough one. I tried setting a custom route through the Grav config but you can't set an empty destination. Also removing trailing slashes through a rewrite rule in the .htaccess file doesn't help. Somehow Grav adds the slash when serving the homepage.

As this behaviour is harming a site's SEO performance I think it is legitimate to create an issue in the Grav core repository.

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 228 9 hours ago
Support · by alex, 2 months ago
8 667 24 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago