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

Coming from WordPress, how to use blog without "/blog" in the URL?

first-time

Started by Logan M. 5 years ago · 4 replies · 420 views
5 years ago

I'm thinking about moving my blog from WordPress to Grav and I've spun up a DEV site for Grav.

In WordPress, my blog post URLS are:
https://mydomain.com/year/month/title

However, in Grav, the closest I can get is:
https://mydomain.com/blog/year/month/title

How can I have a blog in Grav, but remove "/blog" from the URL? I don't want to change the URL structure since it would break all links to my site from external sources.

I found this archived post, but the user ended up just leaving "/blog" in their URLs.

Thanks in advance.

last edited 02/05/21 by Logan M.
5 years ago

Can you set blog as a home page and set an option to exclude home slug in URL? Or like in the linked topic, you have Grav installed under /blog folder?

5 years ago

I would prefer to have "About" as a homepage instead of the blog. So I'm assuming it's one or the other, right?

No, I do not have have Grav installed in a /blog folder.

5 years ago

I'm not good at all htaccess rewrites, but I guess what you could do, is use some rule to rewrite /year/month/title to /blog/year/month/title. But don't know how to make all URLs exclude /blog part if it's not a home page 😕

Maybe someone from Grav team could step in

5 years ago

Ya, I'm going down the same path trying to think of Nginx rewrite rules as well.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
3 92 2 hours ago
Support · by Anna, 3 days ago
2 94 23 hours ago
Support · by Justin Young, 24 hours ago
1 62 24 hours ago
Support · by Duc , 1 week ago
2 98 6 days ago
Support · by Colin Hume, 1 week ago
2 91 6 days ago