^((25[0-5]|2[0-4]\d|[01]?\d\d?)(\.))(?1){2}(?2)$
(\.)
и совсем убрать (?1)
^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?2)$
^((25[0-5]|2[0-4]\d|1?\d\d?)\.){3}(?2)$
{3,20}
rewrite "^/([ex1|ex2]+)/type_([A-Za-z0-9\-\_]+)/([0-9]+)/type_([A-Za-z0-9\-\_]+)/p([0-9]{3,20})$" /event.php?example=$1&alias=$2&event=$3&info=$4&p=$5 last;
/d=?\s*\d+\.\d+\s*(?:см)?|(?<!h|h=\s)\d+\.\d+\s*(?:см)/iu
/d=?\s*\d[\d.]*(?:\s*см)?|(h=?\s*)?\d[\d.]*\s*см(?(1)(*SKIP)(*F))/iu
Задача выцепить из названия Высоту, Диаметр, Объём итд...
/([dvh]=?\s*)?\d[\d.]*\s*(см|м?л)?/iu
600 мл
h= 4.7 см
d=19.3 см
http://demo.my-domain.com/django_static/admin/css/base.css
[error] 520#520: *4 open() "/home/ubuntu/my_project/staticadmin/css/base.css" failed
location /django_static/ {
alias /home/ubuntu/my_project/static;
}
location /django_static/ {
alias /home/ubuntu/my_project/static/;
}
/home/ubuntu/my_project/static/admin/css/base.css
${lc:$1}
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[A-Z].*)$ https://%{HTTP_HOST}/${lc:$1} [R=301,L]
RewriteRule ^([^.]+[^/.])$ https://%{HTTP_HOST}/$1/ [R=301,L]
RewriteCond %{THE_REQUEST} // [OR]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond $0 [A-Z] [OR]
RewriteCond $0 [^/]$
RewriteRule ^([^.]+?)/?$ https://%{HTTP_HOST}/${lc:$1}/ [R=301,L]
RewriteCond %{THE_REQUEST} // [OR]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^([^.]+?)/?$ - [E=URI:$1]
RewriteCond $0 [A-Z] [OR]
RewriteCond $0 [^/]$
RewriteCond expr "tolower(reqenv('URI')) =~ /(.+)/"
RewriteRule ^([^.]+?)/?$ https://%{HTTP_HOST}/%1/ [R=301,L]
RewriteCond %{THE_REQUEST} // [OR]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
он выдает 443 порт
RewriteCond %{HTTP_HOST} ^(?:www\.|)(.+) [NC]
нужно в регулярке поменять (.+)
на ([^:]+)
чтобы отсекать :443
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^(?:www\.|)([^:]+) [NC]
RewriteRule ^(.*[A-Z].*)$ https://%1/${lc:$1} [R=301,L]
RewriteCond %{HTTP_HOST} ^(?:www\.|)([^:]+) [NC]
RewriteRule ^([^.]+[^/.])$ https://%1/$1/ [R=301,L]
RewriteCond %{THE_REQUEST} // [OR]
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.|)([^:]+) [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
\1 ссылается на первую группу
\2 ссылается на вторую группу