Tuesday, 27 August 2013

htaccess url rewrite in dutch language and english language

htaccess url rewrite in dutch language and english language

I am handle with htaccess in my subdomain.
My htaccess script is given below
RewriteCond %{HTTP_HOST} ^demo\.example\.com/carrental$
RewriteRule (.*) carrental/([^/.]+)/([^/.]+)/([^/.]+) [R=301,L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$
carrental/locateaddress.php?country=$1&city=$2&locate=$3 [QSA]
RewriteCond %{HTTP_HOST} ^demo\.example\.com/carrental$
RewriteRule (.*) carrental/([^/.]+)/([^/.]+) [R=301,L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$
carrental/city.php?country=$1&city=$2 [QSA]
RewriteCond %{HTTP_HOST} ^demo\.example\.com/carrental$
RewriteRule (.*) carrental/([^/.]+) [R=301,L]
RewriteRule ^([a-zA-Z0-9_-]+)$ carrental/country.php?country=$1 [QSA]
I have 2 problems.
I Want to pass special characters in my url.
I am already try (.*) but its getting many problems. I want to pass
special characters into ([a-zA-Z0-9_-]+).
My Major Query is i have one url. When my links translate to dutch
language. Url : http://demo.osiztechnologies.com/carrental/Albanië
The problem is because of Albanië. It shows a 404 error. If I change this
into English it works fine.
How can I rewrite URL's with special characters?

No comments:

Post a Comment