[FX.php List] [OFF] Rewrite for forcing http to https possible?
biscuit technologies
biscuit.tech at gmail.com
Tue Sep 23 19:30:50 MDT 2008
Hi Troy,
In re-reading your original post I realized that what's happening is
you are passing a URL with %20 to the rewrite engine and it's encoding
the % again which results in %2520 ("%% " or "percent percent space")
and that's why the URL fails.
I'll think about it a bit more, but would you agree that is the actual problem?
If it is, then the solution is maybe to have a rewritemap that handles
this? Not sure, just thinking out loud.
- David
On Tue, Sep 23, 2008 at 5:29 PM, Troy Meyers <tcmeyers at troymeyers.com> wrote:
> 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
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list