Tomcat:solaris 目录中的法语口音
我们的一位客户在报纸上购买了一份宣传并添加到他的 URL 中: http://www.website.com/publicité 而不是“ publicite”(不带重音)...
我试图在 Solaris 下创建相应的目录,但它似乎不起作用。 我抓住了“get”请求,看起来“真正的”请求是 /publicit%C3%A9 我们尝试添加一个具有该名称的目录,但它也不起作用。
知道网络如何解决这个问题吗?
我们使用 Apache 和 Tomcat 作为带有 JAVA(和 jsp)的 Web 容器
看起来它是一个 Solaris 服务器而不是 Linux。
One of our client bought a publicity in a newspaper and added to his URL :
http://www.website.com/publicité instead of "publicite" (without the accent)...
I'm trying to make the corresponding directory under Solaris and it doesn't seems to work.
I grabbed the "get" request and it looks like the "real" request is /publicit%C3%A9
We tried to add a directory with that name but it doesn't work either.
Any idea of how web could fix this problem?
We use Apache and Tomcat as our web container with JAVA (and jsp)
Looks like it's a Solaris server and not a linux..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许您可以使用 Apache 的 mod_rewrite 将其更改为 publicite (无重音)?
Perhaps you could use Apache's mod_rewrite to change it to publicite (no accent)?
看起来该请求已经过 URL 编码。 棘手的是,它不是标准 ASCII 格式,所以我认为它不能可靠地解码为正确的“é”(因为你无法仅从 URL 知道它最初是 Unicode 而不是 ASCII 格式)。
显然,也没有编码“é”的标准,因此对于来自两个不同客户端的相同请求,您收到的 URL 可能会有所不同。
祝你好运。
Looks like the request has been URL-encoded. The tricky thing is, it's not in standard ASCII, so I don't think it can be reliably decoded to the correct "é" (because you don't know just from the URL that it was originally in Unicode and not ASCII).
Apparently, there is also no standard for encoding "é" either, so the URL you receive might be different for the same request from two different clients.
Good luck.
您到底尝试了什么,怎么失败的?
你可以尝试这个(在 bash 中):
这是 Paul 使用重写的想法的简单版本。
顺便说一句,我刚刚通过粘贴此页面和上面的命令中的文本,毫无问题地创建了一个目录“publicité”。 Apache 在浏览器中很好地列出了空目录(Linux 和 WXP 上的 Firefox),尽管我的英语配置的 Apache 弄乱了列表中的名称:
而且我从 Apache 访问日志中看到的内容与您相同:”获取 /xtra/publicit%c3%a9/ HTTP/1.1"
What exactly did you try, and how did it fail?
You could try this (in bash):
This is a simple version of Paul's idea to use rewrite.
BTW, I just created a directory "publicité" with no problem by pasting text from this page, and from the commands above. Apache lists the empty directory fine in the browser (Firefox on Linux and WXP), albeit my English-configured Apache messed up the name in the listing:
And I'm seeing the same as you from the Apache access log: "GET /xtra/publicit%c3%a9/ HTTP/1.1"