apache - Inaccessible rawurlencoded UTF-8 URL -
i have shared hosting account , using filezilla connect server.
under public_html/items/
folder, there many subfolders , folder names encoded using php rawurlencode
function, these:
apple banana orange %e6%bc%a2%e5%a0%a1%e9%a3%bd %e8%96%af%e6%a2%9d
the problem 404 error when access files under folders names contain non-ascii characters (e.g. chinese characters).
this means can access url one: http://my-domain.com/items/apple/index.html
but not: http://my-domain.com/items/%e6%bc%a2%e5%a0%a1%e9%a3%bd/index.html
what kind of problem possibly be?
many all.
if folders contain physically urlencoded names, you'll need ensure these names urlencoded in urls. in fact, anytime create url 'uncontrolled', potentially url-unsafe elements, must urlencode elements.
thus if have directory named %e8%96%af%e6%a2%9d
you refer in url %25e8%2596%25af%25e6%25a2%259d
pretty, isn't it?
another way of looking @ when use existing urlencoded url, server tries resolve /items/漢堡飽/index.html
Comments
Post a Comment