[FX.php List] [OFF] Rewrite for forcing http to https possible?

Troy Meyers tcmeyers at troymeyers.com
Tue Sep 23 18:29:36 MDT 2008


David,

No, there isn't a genus with a space. It's just a good example to show how the problem manifests itself.

If you try this, _already_ as https, you'll see what the page should look like, even though there isn't a genus name with a space in it:
https://lab.troymeyers.com/flasking/listing.php?genus=Name%20with%20spaces

The page is identified as:
"Items from the genus Name with spaces"
and then it says:
"We don't currently have any items of genus Name with spaces listed."

Garbage in, garbage out, but it's what it's supposed to do.

On the other hand, if you use this URL:
http://lab.troymeyers.com/flasking/listing.php?genus=Name%20with%20spaces
it gets redirected to:
https://lab.troymeyers.com/flasking/listing.php?genus=Name%2520with%2520spaces

So, that page comes up like this:
The page is identified as:
"Items from the genus Name%20with%20spaces"
and then it says:
"We don't currently have any items of genus Name%20with%20spaces."

Now, in a case where it really is OK to have spaces in the GET data, this would be a problem because the GET data is messed up.

Anyway, I'm just using this as an example to show how the problem works.

I appreciate the article. Actually we do do some of those techniques already, but I'll see what more I can learn.

-Troy


> Hi Troy,
> 
> I looked through your site and couldn't find a genus with a space, so I
> figured it was something else.
> 
> If this works you might want to look into clean urls as your next
> challenge for the next time you want to do some apache magic. This may
> be a nice thing to have working for your stuff in general.
> 
> http://www.evolt.org/article/Making_clean_URLs_with_Apache_and_PHP/18/22880/
> 
> - David



More information about the FX.php_List mailing list