How to obtain anchor part of URL after # in php

Simply put: you can’t! Browsers don’t send the fragment (the part of the URL after the hashmark) in their requests to the server. You must rely on some client-side javascript: perhaps you can rewrite the url before using it.

Leave a Comment