Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Index in subfolder adds trailing slash with different canonical url

Started by Rud 6 years ago · 1 replies · 1091 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 blu3prince, 4 days ago
1 71 5 hours ago
Support · by complanar, 7 days ago
6 157 2 days ago
Support · by Rick Beebe, 7 days ago
2 117 3 days ago
Support · by alex, 5 days ago
2 101 4 days ago
Support · by Marcel, 2 weeks ago
1 152 5 days ago