Skip to content

Instantly share code, notes, and snippets.

@idarek
Created June 22, 2024 12:51
Show Gist options
  • Save idarek/f51ebd15f085a2c179987fb8ceb3485e to your computer and use it in GitHub Desktop.
Save idarek/f51ebd15f085a2c179987fb8ceb3485e to your computer and use it in GitHub Desktop.
# Rewrite polish characters in URL to non-polish
# like /zabłąkany/ to /zablakany/
RewriteEngine On
RewriteRule ^(.*)ą(.*)$ /$1a$2 [L,R=302]
RewriteRule ^(.*)ć(.*)$ /$1c$2 [L,R=302]
RewriteRule ^(.*)ę(.*)$ /$1e$2 [L,R=302]
RewriteRule ^(.*)ł(.*)$ /$1l$2 [L,R=302]
RewriteRule ^(.*)ń(.*)$ /$1n$2 [L,R=302]
RewriteRule ^(.*)ó(.*)$ /$1o$2 [L,R=302]
RewriteRule ^(.*)ś(.*)$ /$1s$2 [L,R=302]
RewriteRule ^(.*)ź(.*)$ /$1z$2 [L,R=302]
RewriteRule ^(.*)ż(.*)$ /$1z$2 [L,R=302]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment