Is it possible to 301 redirect anchors to a new site using .htaccess? #140
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Example:
https://www.privacytools.io/#vpn
Redirect to a new folder:
https://www.privacytools.io/vpn/
Just in case we split the website into more sub pages.
You cannot use .htaccess or PHP or anything in the host side to manipulate the fragment. Fragment is not sent to the server by default.
You can use javascript to redirect based on fragment.
But you cannot do 301 redirect using anchors unless you send the anchor to the server.
Closing this since we're hosted on Github pages, which doesn't support editing
.htaccess
.I'm late, but thanks @joas8211
We'll look into it now.
We don't want to use Javascript. We have full nginx control so let's look into redirects there.
We just moved away from GitHub pages. Let's see what we can do
Actually, we may need to use Javascript on second thought if we wish to preserve the
/#vpn
, etc links after switching to multiple pages, since the browser doesn't send hash fragments to the server at all 🙁Which I now see was brought up in the second comment.