Unix/Linux Go Back    

UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

.htaccess url encoding

UNIX for Advanced & Expert Users

htaccess, url encoding

Thread Tools Search this Thread Display Modes
Old Unix and Linux 06-24-2011
LukasB LukasB is offline
Registered User
Join Date: Mar 2011
Last Activity: 5 October 2011, 5:04 AM EDT
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Unix or Linux Question .htaccess url encoding

I tried hard to find out solution but no success. I have put together this code in .htaccess:

Rewritecond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?([^\ ]+)query=(.*?)&([^\ ]+)start=(.*?)&([^\ ]+)\ HTTP/
Rewriterule ^index\.php$ http://subdomain.domain.com/%2/%4? [R=301,L]

RewriteRule ^([a-z]+)/([^/]*)$ /index.php?parameter=0&query=$1&anotherpar=1&start=$2&lastpar=-1 [L]

Working perfectly...but! If there is some diacritics in a address (query parameter), it fails. E.G.: If there is href to:


when someone clicks it, redirection fails. In browsers address bar it shows


Does anyone now a solution how to make it working with european diacritics?

(BTW, what does this htaccess do...url from search engine like


changes to:


and it is actually not only rewrite, but it is 301 redirect, too)

Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find the file encoding and updating the file encoding? cnraja Shell Programming and Scripting 7 05-27-2011 06:50 AM
URL encoding Vichu Shell Programming and Scripting 8 08-27-2008 07:16 PM
encoding palmer18 UNIX for Dummies Questions & Answers 3 08-21-2007 09:35 AM
.htaccess? Puc conDoin UNIX for Dummies Questions & Answers 1 05-28-2001 08:58 AM

All times are GMT -4. The time now is 04:53 AM.