^(.{10,})/(.+)/$
^(.+)/([^/]{10,})/$
RewriteEngine on
RewriteRule ^admin($|/) - [L]
RewriteRule ^$ index.php?module=page&url=main [L,QSA]
RewriteRule ^([^/]*)/?$ index.php?module=category&url=$1 [L,QSA]
RewriteRule ^([^/]*)/([^/]*)/?$ index.php?module=page&url=$1 [L,QSA]
index out of range [0] with length 0
for _, fullName := range fullNames {
result := r.FindAllStringSubmatch(fullName, -1)
if len(result) == 0 {
continue
}
admin/run.php
успешно совпадает с шаблоном ^admin/(.*)$
и происходит бесконечный цикл.admin/run.php
RewriteCond %{REQUEST_URI} !^/admin/run\.php
RewriteRule ^admin/(.*)$ /admin/run.php?request=$1 [QSA,L]
RewriteCond $1 !^run\.php
RewriteRule ^admin/(.*)$ /admin/run.php?request=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^admin/(.*)$ /admin/run.php?request=$1 [QSA,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^admin/(.*)$ /admin/run.php?request=$1 [QSA,L]
RewriteCond %{QUERY_STRING} ^(\d+)([A-Z]+)$
RewriteRule ^$ /?course=%1&utm_source=sms&utm_term=%2 [R=301,L]
RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule (.*) /web/$1
RewriteEngine On
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^css/(.*)$ web/css/$1 [L]
RewriteRule ^js/(.*)$ web/js/$1 [L]
RewriteRule ^images/(.*)$ web/images/$1 [L]
RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule (.*) /web/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php
server {
listen 80;
listen [::]:80;
server_name ~^www\.(?<mydomain>example\.(?:de|es|ch|uk|eu|ru|nl|pl|us|fr|jp|co|hk|in|it))$;
rewrite ^(.*) http://$mydomain$1 permanent;
}
server {
listen 80;
listen [::]:80;
server_name ~^www\.(example\.(?:de|es|ch|uk|eu|ru|nl|pl|us|fr|jp|co|hk|in|it))$;
return 301 http://$1$request_uri;
}
RewriteRule ^pictures/product/[^/]+/(\d+)_\w+\.(jpe?g|png)$ /wp-content/uploads/$1.$2 [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)(page-\d+)
RewriteRule ^category/$ https://site.ru/$0%1? [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)section=(termoobrabotka_galvanicheskih_pokritij)(?:$|&)
RewriteRule ^$ https://zctc.ru/sections/%1? [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)section=([^&]+)
RewriteRule ^$ https://zctc.ru/sections/%1? [R=301,L]