There is a task of introducing CNC to the site and there is a problem with get requests.

There is a url string http://www.mysite.com/proizvoditel?id=4 , it needs to be converted to http://www.mysite.com/proizvoditel/4

Here is the code of the .htaccess file

RewriteBase / RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php 

2 answers 2

Try this:

 RewriteCond %{QUERY_STRING} ^id=4$ RewriteRule ^(proizvoditel)$ /$1/4? [R=301, L] 
     RewriteRule ^proizvoditel/([a-zA-Z0-9_-]+)(/?)$ index.php?do=proizvoditel&id=$1