Apache & URL encoding: Fix broken links with special characters and accents in URL

Viewed 24

I moved my simple HTML website to a new host. It has hard-coded links with accents in the URL which stopped working. Apparently the site used ISO-8859-1 and the new host UTF-8

Example of the word "condición" in links looks like:

condici%F3n

That returns a 404 but if I write

condici%C3%B3n

on the address bar, it works fine.

So far I've tried editing the .htaccess file adding

IndexOptions +Charset=ISO-8859-1

Adding "AddDefaultCharset ISO-8859-1" to apache configuration file.

And running "iconv -f ISO-8859-1 -t utf-8 fileA -o fileB"

None of this seems to work and the links are still broken

How can I fix the links on my 500k pages without doing it manually?

Thanks!

0 Answers
Related