server {
...
root /home/site/public_html;
rewrite ^/(ru|en)?/?(faq|news|page|catalogue|basket|photos|search|users)(.*)$ /index.php?lang=$1&module=$2&mod_rewrite=$3;
rewrite ^/$ /index.php;
location / { }
location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm7.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|woff|ogg|mpe?g|avi|zip|gz|rar)$ {
add_header Pragma public;
add_header Cache-Control "public";
access_log /home/site/cache.log;
expires 1d;
}
} Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule (.*)\.html$ https://domain.ru/$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !sitemap\.xml$
RewriteRule ^(.*[^/])$ https://domain.ru/$1/ [L,R=301]
RewriteCond %{HTTP:PORT} !^443$ [OR]
RewriteCond %{HTTP_HOST} !^domain\.ru [NC]
RewriteRule (.*) https://domain.ru/$1 [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] RewriteRule ^(.*)$ /public/$1RewriteRule ^(.*)$ public/$1RewriteCond %{REQUEST_FILENAME} !-f # не файл RewriteCond %{REQUEST_FILENAME} !-d # не папка
# не файл
RewriteCond %{REQUEST_FILENAME} !-f
# не папка
RewriteCond %{REQUEST_FILENAME} !-d http://domain/pathRewriteRule shop(\.\d+\.\d+)\.test\.info http://15.10$1/shop [P]RewriteCond %{HTTP_HOST} shop(\.\d+\.\d+)\.test\.info
RewriteRule ^ http://15.10%1/shop [P] $str = 'колесо';
$letters = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);
foreach ($letters as $i => &$letter) {
$letter .= '(?!\\g' . ($i + 1) . ')()';
}
$regex = '#^(?:'.implode('|', $letters).')++$#u';
echo $regex, PHP_EOL;
$words = array ('колесо','колосс','оселок');
var_dump(preg_grep($regex, $words)); '#<a [^>]*href="(https://google\.com/[^"]*).+?</a>#isu''#<a [^>]*href="([^"]+)"[^>]*>(?:(?!</a>).)*\bLink1\b#isu' RewriteCond %{REQUEST_URI} !^/user/plugins/fred/elFinder-2\.1\.50 (?s).*?(page\.php\?id=\d+|\z)$1\nRewriteCond %{THE_REQUEST} " /current/public/(\S*)"
RewriteRule ^ https://%{HTTP_HOST}/%1 [R=301,L,NE]