3

I have a problem with a redirect rule that doesn´t work with spanish special characters. I dont know how can i convert my word to type into the htaccess file, because the charset supported by htaccess file doesn´t recognice de Á, É, etc characters. Do you know can i set the redirect rule for something like:

Redirect 301 /home/BÁSICO.pdf http://example.com/exampledocument.pdf

or

Redirect 301 /home/MÉDICOS.pdf http://example.com/exampledocument.pdf
Mike Rockétt
  • 8,947
  • 4
  • 45
  • 81
Eduardo Andrés
  • 117
  • 2
  • 12

3 Answers3

2

You can try this:

If you are editing the .htaccess file with Putty, you can try this with your keyboard: 1)accent key; 2)Shift+(A,E,I,O,U); 3)Space bar

With this method I did a similar redirection works fine.

kaiser1871
  • 157
  • 6
1

Unicode is a little tricky - you may be better off with the encoded version:

Redirect 301 /home/B%C3%81SICO.pdf http://example.com/exampledocument.pdf
Redirect 301 /home/M%C3%89DICOS.pdf http://example.com/exampledocument.pdf

You can use this encode for assistance: http://meyerweb.com/eric/tools/dencoder/

Note: I have not tested this, but it is based off this question/answer.

Mike Rockétt
  • 8,947
  • 4
  • 45
  • 81
  • Thanks a lot, but after try that, i´ve got 301 412 errors on httpd log but getting the spected URL with the Unicode characters... Have you any idea of why? maybe do i need to add a "\"??? – Eduardo Andrés Jan 20 '16 at 08:15
1

Also exist other posibility. You can try to change all special characters with this "(.*)" in the RewriteRule.

kaiser1871
  • 157
  • 6