Jump to content

404 Not Found on URL with special characters


aludev

Recommended Posts

Hello there,

 

I have discovered an issue with a client. I have simplified the URL for the example (PayPal sends lot of data). It is as follows:

 

 

This one fails (shows 404)

www.examplestore.com/module/paypalusa/validation?FIRSTNAME=Jos%E9

This one does not

www.examplestore.com/module/paypalusa/validation?FIRSTNAME=José

And weird thing is, they mean the same (%E9 == é URL encoded, although UTF-8 style would be %C3%A9, which also works fine, but I cannot change what PayPal sends back).

 

Also, I have tested with something like

www.examplestore.com/?a=%E9

And of course, it shows 404. So it is a general issue.

 

Do you know why Prestashop doesn't play nice with the %E9 encoding and how to fix it?

 

Thanks in advance!

Link to comment
Share on other sites

I think you should fix this on .htaccess level, and let apache rewrite the URL to some URL that prestashop recognises again.

Sorry, have no direct experience with this, so no clear answer on how to do this, but maybe have a look at a link like this, which may give you more insight:

http://stackoverflow.com/questions/459667/how-to-encode-special-characters-using-mod-rewrite-apache

 

 

 

Another idea:

Can you change what you send to PayPal in the first place?

 

Then maybe either simplify the name by replacing special chars to a-z ones, or maybe first translate to UTF-8 ones and see if PayPal works with that and sends it back like that?

 

 

My 2 cents,

pascal.

Link to comment
Share on other sites

Well, that Apache stuff looked promising, but didn't solve the issue. It seems to solve a slightly different problem (i.e. double parse special chars).

 

About the other idea, it is PayPal the one sending me those chars, not myself. And I am not worried just for PayPal, but for Prestashop in general. I mean, we all usually do UTF-8, but if someone comes with the other basic url encoding, cannot we support it?

 

I'm wondering... maybe Prestashop is validating URLs and does not accept this encoding? Is it possible? And, if it is, where do I look for that?

 

Thanks for the reply anyway.

Link to comment
Share on other sites

hi everybody, i had the same problem ( im completely neewby to all this ) but i solved the problem. i log into my panel and go to security and switch off Modsecurity and paypal works for me now:-) i had spend all day looking how to fix it and it was so simple...

Link to comment
Share on other sites

Your panel/security? I will suppose you mean from PayPal. If not, I'm lost.

 

BTW, it is not exactly what I would like to do, but tech guys from PayPal responded this to my ticket on making their calls UTF-8 encoded (just in case anyone needs it):

Here are the steps you can follow:
Log into PayPal https://www.paypal.com/webapps/customerprofile/summary.view
Click the ‘My selling tools' 
Then scroll down to: More selling tools
Click the ‘ PayPal button language encoding' link under the ‘Selling Preferences’ column
Click ‘More Options’
Set ‘Encoding’ to ‘UTF-8’ in two dropdowns
Click ‘Save’

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...