Msg#: 4153020 posted 4:36 pm on Jun 15, 2010 (gmt 0)
I am wondering if htaccess can help me with this
Facebook is encoding the slashes and question marks after the query string of any link I add to it. So that example.com?who/what?when becomes example.com?who%2Fwhat%3Fwhen which returns a not found or error message when clicked in the browser
Is there a way htaccess could be used to convert any "%2F" in a url back to a slash "/" and any "%3F" in a url back to a question mark "?"
I've only used htaccess for redirects, so... be kind. Thanks you!
Msg#: 4153020 posted 2:00 am on Jun 16, 2010 (gmt 0)
Yes, encoding of those characters is required by the HTTP protocol specification. Therefore, FaceBook is "doing it right."
Correct your scripts to generate, require, and handle encoded characters as specified. See urldecode() in PHP.
We webmasters are not free to "use any old character anyplace we like" in hostnames, URL-paths, and the query strings appended to those URLs. See RFC2396 - Uniform Resource Identifiers (URI): Generic Syntax [faqs.org] for more information. Note that the 'rules' for encoding vary, based on the three URL-parts that I identified.