<IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^potolkirostov.ru RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_URI} ^(.*)/index\.(php|html)$ RewriteRule ^(.*)$ %1/ [R=301,L] RewriteCond %{THE_REQUEST} // RewriteRule .* /$0 [R=301,L] </IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)/index\.(php|html)$
RewriteRule ^(.*)$ https://potolkirostov.ru%1/ [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://potolkirostov.ru/$1 [L,R=301]
RewriteCond %{THE_REQUEST} //
RewriteRule .* https://potolkirostov.ru/$0 [R=301,L]
</IfModule>
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
/news/a?=$1
на /news?a=$1
RewriteRule ^news/(\w+)$ /news?a=$1 [L]
RewriteRule ^news/(\w+)$ /news.php?a=$1 [L]
print('matches: ', matches)
print('matches: ', matches.group(1))
^~
netstat -ntlp
или ss -ntlp
.<VirtualHost *:80>
Redirect / https://site.ru/
listen 80;
и нужным server_name.return 301 https://site.ru$request_uri;
server {
listen 80;
server_name site.ru www.site.ru;
return 301 https://site.ru$request_uri;
}
# BEGIN WordPress <ifmodule mod_rewrite.c="">
mod_rewrite.c=""
, а просто mod_rewrite.c
. preg_match_all('/(min|max):(\d+)/', $str, $m);
$r = array_combine($m[1], $m[2]);
print_r($r);
!^$
.RewriteCond %{QUERY_STRING} !^$
RewriteRule ^$ /? [L,R=301]
Это можно сделать через proxy_pass или прямо в fastcgi_param.