Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

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

first-time

Started by Logan M. 6 years ago · 4 replies · 595 views
6 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.
6 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?

6 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.

6 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

6 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 webmasterodp, 4 days ago
4 110 3 days ago
Support · by nwhitfield, 5 days ago
2 97 5 days ago
Support · by stell, 2 weeks ago
5 339 1 week ago
Support · by gravinator, 1 month ago
5 537 1 week ago
Support · by Gravver, 3 weeks ago
6 333 3 weeks ago