I have a page running a custom shortcode. When an element on the page is clicked I am pushing a new url into the browser (using history.pushstate) and displaying the content in the same window.
If this url is copied and pasted at a later date into the browser, I want to be able identify this and display the content. As the requested element is not actually a real page/post, I am having difficulty. I can use template_redirect hook to identify if it is the link I am interested in, and I can forward the page - but I don't want to forward, I want to keep the url but load a specific page.
Is there a way of doing this?