Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Sep 08, 2014 11:56 pm 
Offline
Junior Member

Joined: Fri Aug 09, 2013 8:58 pm
Posts: 33
Hello,

My site lost a bunch of traffic lately, because iPhone/iPad users are hitting 404 pages.

Traffic from iPhone/iPad Safari to my website through Facebook somehow ended up in a wrong URL (404 error ) since 8/28/2014. For example, if a iPhone user click the shared link (that has Chinese characters in the URL) on https://www.facebook.com/onefunnyjoke/p ... 0155632338, it goes to a page that does not exist.

However, it appears not all iPhone users have the problem.

I've checked my error log, not seeing anything suspicious. Once I made my URL English, the problem does not exist anymore (tested). Any ideas?

Thanks,

Allen


Top
   
PostPosted: Wed Sep 10, 2014 1:18 am 
Offline
Linode Staff

Joined: Mon Jun 16, 2014 2:27 pm
Posts: 50
Location: Galloway, NJ
Allen,

It is possible that the iPhones that are receiving this issue are using browsers (or versions of browsers) that do not support unicode formatting in URLs.

When a URL does have unicode characters, the browser usually changes those characters into their "percent" (%) value. Such as when you go to a URL with a space in it, the browser will change it to %20 for the space.

It is likely that the browsers that are not able to hit those pages are not changing those URLs to the correct "percent" (%) formatting. With this being said, there's not much that you can do from the server-side.

Thanks,

Dave.


Top
   
PostPosted: Wed Sep 10, 2014 3:42 am 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
drussell wrote:
It is likely that the browsers that are not able to hit those pages are not changing those URLs to the correct "percent" (%) formatting. With this being said, there's not much that you can do from the server-side.


Well, if you really needed that traffic, you could probably write a few lines of code to detect when the URL has been encoded with a different character set (e.g. GB or EUC-JP instead of UTF-8) and convert them back to your website's charset. With some clever mod_rewrite tricks, you could then redirect those users to a URL with the proper charset. But let's leave that as an exercise for OP...


Top
   
PostPosted: Sun Sep 14, 2014 12:50 am 
Offline
Junior Member

Joined: Fri Aug 09, 2013 8:58 pm
Posts: 33
drussell wrote:
Allen,

It is possible that the iPhones that are receiving this issue are using browsers (or versions of browsers) that do not support unicode formatting in URLs.

When a URL does have unicode characters, the browser usually changes those characters into their "percent" (%) value. Such as when you go to a URL with a space in it, the browser will change it to %20 for the space.

It is likely that the browsers that are not able to hit those pages are not changing those URLs to the correct "percent" (%) formatting. With this being said, there's not much that you can do from the server-side.

Thanks,

Dave.


Thanks for your reply! The browser that is having this issue is Safari (mobile). I was suspecting the same thing (unicode characters), but everything was fine before 8/28/2014, which is a little odd to me..


Top
   
PostPosted: Sun Sep 14, 2014 1:03 am 
Offline
Junior Member

Joined: Fri Aug 09, 2013 8:58 pm
Posts: 33
hybinet wrote:
drussell wrote:
It is likely that the browsers that are not able to hit those pages are not changing those URLs to the correct "percent" (%) formatting. With this being said, there's not much that you can do from the server-side.


Well, if you really needed that traffic, you could probably write a few lines of code to detect when the URL has been encoded with a different character set (e.g. GB or EUC-JP instead of UTF-8) and convert them back to your website's charset. With some clever mod_rewrite tricks, you could then redirect those users to a URL with the proper charset. But let's leave that as an exercise for OP...


Thank you, hybinet! As a front-end guy, this almost sounds too dreamy to be true. I hate to ask, but any further instruction on this method (or any other suggestions) would be greatly appreciated.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: mwchase and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group