RewriteCond %{HTTP_HOST} ^(www\.)?italy\.domainname\.com$ [NC]
RewriteRule ^contacts$ http://www.domainname.com/contacts?country=Italy [R=301,L]
RewriteCond %{HTTP_HOST} ^(?:www\.)?+(.+)\.(domainname\.com)$ [NC]
RewriteRule ^(contacts)$ http://www.%2/$1?country=%1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^(?:www\.)?+(.+)\.(domainname\.com)$ [NC]
RewriteRule ^(.*)$ http://www.%2/$1?country=%1 [R=301,L]
RewriteCond %{HTTP_COOKIE} (?:^|;\s*)city=([^;]+)
RewriteCond "%1 moskva=url1 omsk=url2 orsk=url3" "^(\S+) .*?\1=(\S+)"
RewriteRule ^ /%2 [R=301,L]
/^(?=.*[а-яё])(?=.*\d)[а-яё\d]+$/ui
/^(?:[а-яё]()|\d())++\1\2$/ui
location / {
resolver 8.8.8.8;
proxy_pass http://$arg_url;
add_header Access-Control-Allow-Origin *;
}
function transform(addr) {
const regEx = /((д(ом)?|стр(оение)?|\/|-)\.?\s*|)\d+((,?\s*(к(ор(п(ус)?)?)?\.?)\s*\d+)|(\s*[а-я])|(\s*\/\s*\d+))?\s*$/;
let result = addr.replace(regEx, function(m0, m1) {
if (m1) {
return m0;
} else {
return 'д. ' + m0;
}
});
return result;
}
console.log(transform('Татарстан, г. Казань, ул. Баумана, 36'));
RewriteEngine On
RewriteCond %{HTTP_HOST} old.ru
RewriteCond %{REQUEST_URI} !^/yandex_3457472в87f2рecd\.html
RewriteRule (.*) http://new.ru/ [R=301,L]
RewriteRule ^games/([^/]*)
RewriteRule ^games/finished/?$ index.php?do=games&t=finished [L]
RewriteRule ^games/live/?$ index.php?do=games&t=live [L]
RewriteRule ^games/shudle/?$ index.php?do=games&t=shudle [L]
RewriteRule ^games/shift/?$ index.php?do=games&t=shift [L]
RewriteRule ^games/([^/]*)/?$ index.php?do=games&date=$1 [L]
Options +FollowSymLinks
DirectorySlash Off
RewriteEngine On
RewriteRule ^blog/$ /blog [R=301,L]
RewriteRule ^blog$ /blog/index.php [L]
RedirectMatch 301 ^/(.*)\+$ /$1
RewriteEngine On
RewriteRule ^(.*)\+$ /$1 [R=301,L]