I have a page at www.digitalwings.nz/recipients.html where the slug has been changed to www.digitalwings.nz/communities.html
I added a _redirect file in the root with the following entry: /recipients.html /communities.html and while it works, the URL in the browser address bar is not changing to show the new address.
I have read the instructions at Redirect options | Netlify Docs and believe the first example (301) represents my implementation. I have also tested in the playground at Netlify's playground and got a "Yay! All redirects are valid.
I’m at a loss to understand why the URL in the browser does nor change to the new slug: www.digitalwings.nz/communities.html when I enter www.digitalwings.nz/recipients.html in the browser?
Only the communities.html files exist, it was renamed from recipients.html and on checking there are no backups of the old recipients.html file. The redirect is only required for users who have bookmarked or otherwise saved the old recipients.html url
Maybe I’ve misunderstood this paragraph on the Netlify docs page, specifically the last sentence:
301 (default) : permanent redirect code. Tells the client that the address for this resource has permanently changed, and any indexes using the old address should start using the new one. The URL in the browser address bar will display the new address."
Thanks for the demo, explains it in a way that is easy to understand. So my setup would be the second one in the example demo, * page3.html does not exist, so the redirect triggers. The content of new-page.html is returned and the URL shows new-page.html . A 301
In my case, “new-page.html” is returned but the URL is not showing “new-page.html” rather it shows “page3.html”.
Have you confirmed in the current published deploy that recipients.html does not exist? Check this by downloading the deployed files e.g(your deploy possibly isn’t locked):
recipients.html is in the ZIP, but not in my local folder or reported in the desktop git client. I’ll have to find out why files deleted locally are not deleted from git on the web. Thank you for your assistance and persistence with this issue. I expect it to work as soon as I get that rogue file deleted.