How can I send a PHP request based upon the incoming Hash Tag?

I have a hash tag I need to process. My Javascript gets it, reformats it a little, and now I need to redirect to a page with that hashtag. However, the hashtag is the name of the post, and WordPress is set up to have its urls with the date of the post. So I need to send a request to the DB to either redirect to the post, or get the url or ID of the post then use javascript to redirect..

Thanks sooo much for your help!

Related posts

Leave a Reply

2 comments

  1. A hash tag is a means of indicating a search term in a twitter message. I think you mean a fragment identifier.

    Fragment identifiers are handled client side and are not sent to the server when a URL is requested.

    If you want to get that data from them you must parse the URI in JavaScript (see location.hash) and make a new HTTP request to the server that includes it as data.

    It is not recommended to use fragment identifiers when it makes sense for the server to know about their content on the initial request.