Is there possible to redirect `baseURL` for all pages at once?

I recently realized that I can make site URL much shorter, but I am not aware how can I redirect all pages at once. I’ve read doc about aliases, but it seems that it works for singular pages and doesn’t affect baseURL:

An alias with a leading slash is relative to the baseURL
An alias without a leading slash is relative to the current directory

I think it’s better to do it on server side. Such as the Cloudflare Page Rules, Netlify Redirects and Rewrites and so on.

1 Like

What’s the best option to use if I need it for free and be able to figure out how to do it as quickly as possible? :thinking:

Do you intend to change the “baseURL” from one domain to another, or just the subpath?

The best option is related to the platform used to deploy your sites. As I know, Cloudflare and Netlify provide this feature for free.

Ideally, I wanna do this: https://command-line-interface-pages.github.io/site.github.io/https://ebbc-cli/.

The GitHub Pages allows adding custom domain (repo → settings → Pages → Custom domain), GitHub Pages will handle the redirects.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.