Another redirect question. #!

No.

It is because a # symbol is interpreted by the browser, so the Netlify redirect engine is never aware of it. This is a fundamental part of how the WWW/HTML/etc. works.

See this answer on stack overflow

If you need/want to handle an # in a URL as explained in this post is to handle it with client-side javascript. Use the URL() constructor to create a URL object. You can then check for the existence of URL.hash along with pathname etc. and redirect accordingly.

URL {
  hash: "#!/itemDetails/419/37888"
  host: "www.apexauctions.co.uk"
  hostname: "www.apexauctions.co.uk"
  href: "https://www.apexauctions.co.uk/auction/#!/itemDetails/419/37888"
  origin: "https://www.apexauctions.co.uk"
  password: ""
  pathname: "/auction/"
  port: ""
  protocol: "https:"
  search: ""
  searchParams: URLSearchParams(0)
  username: ""
}
1 Like