htaccess的重定向变音 [英] Umlauts in htaccess redirects

查看:154
本文介绍了htaccess的重定向变音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于变音的下列htaccess的规则不起作用。

The following htaccess rule doesn't work because of the umlauts.

Redirect 301 /xyz/händedruck.html  /new/händedruck.html

这怎么重定向被修改,使得它的工作原理?

How can this redirect be modified so that it works?

推荐答案

尝试连接codeD网址: /xyz/h%C3%A4ndedruck.html

Try encoded URL instead: /xyz/h%C3%A4ndedruck.html

要得到这个字符串在PHP中您可以使用 urlen code 的功能。

To get this string in PHP you can use the urlencode function.

也有许多网站可以做URL编码为您服务。例如: http://meyerweb.com/eric/tool​​s/den$c$cr /

There are also many websites that can do urlencoding for you. For example: http://meyerweb.com/eric/tools/dencoder/

这篇关于htaccess的重定向变音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆