Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Index in subfolder adds trailing slash with different canonical url

Started by Rud 6 years ago · 1 replies · 964 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 Thomas, 1 week ago
2 66 18 hours ago
Support · by Anna, 3 days ago
2 72 21 hours ago
Support · by Justin Young, 22 hours ago
1 40 21 hours ago
Support · by Duc , 1 week ago
2 76 6 days ago
Support · by Colin Hume, 1 week ago
2 70 6 days ago