Problems with mod_rewrite

1

I'm having a problem with mod_rewrite in .htaccess.

The problem is this: If I search something like Michael Jackson it looks like this: site.com/search/Michael%20Jackson/82920rdn#ir everything goes normal.

But if I search Michael Jackson original of the following error below because of % (percentage). I did some research and saw that the error is in the URLs friendly, but I did not find a solution.

Error:

  

Bad Request

     

Your browser sent a request that this server could not understand.   Additionally, at 400 Bad Request error was encountered while trying to use an ErrorDocument to handle the request.

My code in .htaccess:

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteRule ^pesquisar/([^/]+)/([a-z0-9-]+)/?$ /index.php?action=pesquisar&busca=$1&token=$2 [L]
 </IfModule>

Any solution to this?

    
asked by anonymous 08.02.2017 / 02:25

1 answer

1

Get solved!

The solution is to convert % via urlencode .

Example: link

    
08.02.2017 / 05:37