Mobile app version of vmapp.org
Login or Join
Deb1703797

: How do I link to web pages with umlauts in their filename? I am trying to create an HTML link to a web page hosted on an Apache server that contains umlauts (in my test case it is ä.html).

@Deb1703797

Posted in: #CharacterSet #Htaccess #Hyperlink #Url

I am trying to create an HTML link to a web page hosted on an Apache server that contains umlauts (in my test case it is ä.html).

So I tried the following in HTML:

<a href='ä.html'>ä.html</a>

<a href='&auml;.html'>&amp;auml;.html</a>

<a href='%C3%A4.html'>%C3%A4.html</a>


and

<a href='%E4.html'>%E4.html</a>


Only the last link fetched the page I intended. The other links gave me a 404.

Of course, I'd rather go with the first two options. Is there a way to configure a directory directive such that this is possible?

Unfortunately, I have no admin rights on the server. I can only change the .htaccess in the directory.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

2 Comments

Sorted by latest first Latest Oldest Best

 

@Hamm4606531

A better solution is to never use accented or special characters in URL's as they can case problems with linking.

Best practice is to convert accented characters to the non accented version.

10% popularity Vote Up Vote Down


 

@Looi9037786

Are you sure that <a href='&auml;.html'>&amp;auml;.html</a> doesn't work? It should link to the right document (although the link text will be wrong, as you also encoded the &; the correct way to do this would be <a href='&auml;.html'>&auml;.html</a>).

However, if you just want to use umlaute directly, you can do so by making sure that:


You saved your file with a character set that allows umlaute (eg utf8).
You specified that character set via <meta charset="[CHARACTER_SET]">.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme