Forum Moderators: phranque
I just learned this stuff yesterday, so I don't know if this is a bug or not.
RewriteRule ^profile/(.+)/$ profile.php?username=$1
Now most usernames have a '.' at the end of their username (don't ask me why, it's an API i'm using), when i call $_GET['username'] in the PHP script, it doesn't get the period.
In other words, if what's typed into the address bar is:
/profile/Ifawej./
It essentially is redirected to /profile.php?username=Ifawej
(without the period)
Is there a fix for this?
Thanks.
Despite what we may want, we are not free to put any character any place in a URL -- The HTTP protocol has specific rules [faqs.org] about URL structure which are intended to simplify URL parsers and to make the URL path-parts unambiguous and easy to distinguish.
I'd suggest you eliminate the period as early as possible in the URL-construction process, and then add it back in the script that needs it, if that script cannot be made to work without it.
Jim