Using hash address and htaccess
-
Hi. I have a site which I am using Ajax to display posts in an overlay. When I do this I change the URL with window.location.hash. That works fine. However, I want for user to be able to be able to go directly to that single post view if they copied pasted that link. (Like how instagram works).
For example, via the ajax page they get this url https://www.mydomain.com/shop/#45. If they went to that URL directly I would want the htaccess file or wordpress (however its done) to redirect them to https://www.mydomain.com/?p=45, which with my permalink structure would take them to https://www.mydomain.com/products/blue-hat.
Should I be using a wordpress mod rewrite or htacess? Any help appreciated. Thanks.
- The topic ‘Using hash address and htaccess’ is closed to new replies.