Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Umlauts in htaccess redirects

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?

like image 357
htw Avatar asked Nov 25 '25 17:11

htw


1 Answers

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

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

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

like image 138
Igor Chubin Avatar answered Nov 27 '25 05:11

Igor Chubin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!