0

I'm having troubles with URL rewriting. My rules work well but they encode GET parameters.

/myurl/search?text=accès becomes /myurl/search?text=acc%25C3%25A8s

My search engine cannot work with this parameter and i cannot pass them in POST method. How can I get rid of that encoding ?

Here is the content of my .htaccess :

RewriteEngine On

RewriteRule ^var/.* - [L]
RewriteRule ^design/.* - [L]
RewriteRule ^share/icons/.* - [L]
RewriteRule ^sitemaps/.* - [L]
RewriteRule ^kernel/.* - [L]
RewriteRule ^extension/.* - [L]
RewriteRule ^packages/styles/.* - [L]
RewriteRule vols/redirect - [L]

RewriteRule ow_gmapdata/.* /index_ajax.php [L]
RewriteRule adlMenu/.* /index_ajax.php [L]
RewriteRule vols/.* /index_ajax.php [L]
RewriteRule adlCarrousel/.* /index_ajax.php [L]
RewriteRule retro-planning/.* /index_ajax.php [L]
RewriteRule opodo/.* /index_ajax.php [L]
RewriteRule adlformparamhandler/.* /index_ajax.php [L]
RewriteRule ^index_ajax\.php - [L]

RewriteCond %{THE_REQUEST} ^GET\ /index\.php
RewriteRule ^index\.php/?([^/].*)?$ /$1 [L,R=301]
RewriteRule !^index\.php$ index.php [L]
1

Ok, found it !

I needed the flag NE on the main rewrite rule :

RewriteRule ^index\.php/?([^/].*)?$ /$1 [L,R=301,NE]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.