I am trying to set up a redirect for images, due to a change in the location of images relative to the root, as well as the name of the images.
Example of the previous address: http: //sayt.rf/directory/i/img_03_01.jpg
Example of a new address: http: //sayt.rf/i/cat/podcat/img-03-01.jpg
This kind of string for some reason does not work:
RewriteRule ^ directory / i / img _ ([0-9] +) _ ([0-9] +). Jpg $ i / cat / podcat / img- $ 1- $ 2.jpg [R = 301, L]
каталогwith[^/]+. If you only had pictures in this directory, then there should not be any problems with redirection. - VismanRewriteEngine On RewriteCond %{THE_REQUEST} ^[AZ]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ http://сайт.рф/ [R=301,L] RewriteCond %{HTTP_HOST} ^www.сайт.рф RewriteRule (.*) http://сайт.рф/$1 [R=301,L] RewriteRule ^(.*)$ index.php [L,QSA]- crawler777