RewriteEngine On
RewriteCond %{THE_REQUEST} ^\S+\s+/public(\S+)
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?$0 [L,QSA]
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/folder1/
RewriteCond %{REQUEST_URI} !^/script\.php
RewriteRule ^(.*)$ /folder1/$1 [L]
RewriteEngine on RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.html\ HTTP RewriteRule ^([^.]+)\.html$ site.ru/$1 [R=301,L] RewriteCond %{REQUEST_URI} !(\.[^./]+)$ RewriteCond %{REQUEST_fileNAME} !-d RewriteCond %{REQUEST_fileNAME} !-f RewriteRule (.*) /$1.html <IfModule mod_rewrite.c> RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ RewriteRule ^index\.html$ http://%{HTTP_HOST}/ [R=301,L] </IfModule>
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} "^GET ([^?]*?)(/index)?\.html"
RewriteRule ^ %1 [R=301,L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^([^.]+)$ /$1.html [L]
server {
server_name my.domain.com;
location / {
proxy_pass http://domain.com/my/;
}
}
RewriteCond %{HTTP_HOST} ^(www\.|)site1\.ru$ [NC]
RewriteRule ^(.+)$ http://site2.ru/$1 [R=301,L]
location ^~ /upload {
location ~ \.(png|jpe?g|gif)$ {
}
return 403;
}
location ^~ /source {
location ~ \.(js|css)$ {
}
return 403;
}
RewriteEngine On
RewriteCond %{THE_REQUEST} " /pages/page_0\.aspx\?id_page=272&id_region=1 "
RewriteRule ^ https://newsite.ru/b.html? [L,R=301]
RewriteCond %{THE_REQUEST} " /pages/page_0\.aspx\?id_page=888&id_region=34 "
RewriteRule ^ https://newsite.ru/ccc.html? [L,R=301]
RewriteRule ^ https://newsite.ru/ [L,R=301]
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)id_page=272($|&)
RewriteCond %{QUERY_STRING} (^|&)id_region=1($|&)
RewriteRule ^pages/page_0\.aspx$ https://newsite.ru/b.html? [L,R=301]
RewriteCond %{QUERY_STRING} (^|&)id_page=888($|&)
RewriteCond %{QUERY_STRING} (^|&)id_region=34($|&)
RewriteRule ^pages/page_0\.aspx$ https://newsite.ru/ccc.html? [L,R=301]
RewriteRule ^ https://newsite.ru/ [L,R=301]
RewriteEngine On
RewriteCond %{QUERY_STRING} ^/
RewriteRule ^(.*)$ /$1? [R=301,L]
str = Regex.Replace(
str,
@"(?sx)
(?=/\*[^+])
(?> (?'open'/\*)
| (?'-open'\*/)
| .
)+?
(?(open)(?!))",
""
);
RedirectMatch 301 ^/(.*length)-(.*)$ /$1_$2
RewriteEngine On
RewriteRule ^(.*length)-(.*)$ /$1_$2 [R=301,L]
RedirectMatch 301 ^/product/(.+(guide|bulbs))$ /$1
RewriteEngine on
RewriteRule ^product/(.+(guide|bulbs))$ /$1 [R=301,L]
location ~* \.(jpe?g|gif|png|svg)$ {
if ($arg_moderation = "on") {
rewrite ^ /upload/system/no-avatar.jpg break;
}
}