Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Routing/Redirecting Fails?

Started by Greg Curtis 7 years ago · 0 replies · 637 views
7 years ago

Hi,

Site is available at https://site.co, which is fine, but all URL's are also available at https://site.co/site, which I want to prevent.

Tried editing site.yaml as per the docs ...

TXT
redirects:
#  '/redirect-test': '/'     # This works
#  '/site/(.*)': '/$1'          # Fails?

Tried a few other things, including redirecting in each page, but no luck; I think due to there being a resource at the URL, preventing the redirect.

Should I be redirecting, or is there a better way; preferably that can be applied globally?

Cheers.

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 6 days ago
0 93 6 days ago
General · by Dima, 2 weeks ago
1 121 2 weeks ago
General · by pamtbaau, 2 weeks ago
0 194 2 weeks ago
General · by lynbor, 2 months ago
5 701 4 weeks ago
General · by Andy Miller, 1 month ago
0 427 1 month ago