Project ID: 4ced3b38-30ba-4043-8a2a-29e821fd952d
Non tech user here. I deployed a simple static website from my github repo to mydomain.com (hiding the name)
page.html is where files hosted.
mydomain.com/page pretty url is working correctly and using mydomain.com/page.html (before even i created the _redirects file)
but when we access mydomain.com/page.html that is also opening with .html in the url, i want it to redirect to 301 mydomain.com/page
Used the below _redirects file in build output folder in my git repo but still no luck!!!
This looks to be high level error so not sharing site name. if its must then ill share it as well.
please help and thank you.
_redirects file:
latest deploy log shows all rules processed without errors but not working…
- 8 redirect rules processed
All redirect rules deployed without errors.
@gushy0202 You cannot do that with redirects.
A solution is to specify the canonical
url:
Another option would be Edge Functions:
thanks this can be closed