Documentaion fixes
This commit is contained in:
10
README.ru.md
10
README.ru.md
@@ -97,7 +97,7 @@ RewriteRule pattern substitution [flags]
|
||||
RewriteRule ^old-path/(.*)$ /new-path/$1 [R=301,L]
|
||||
|
||||
# Условное переписывание (цепочка)
|
||||
RewriteCond %REQUEST_URI !^/admin/
|
||||
RewriteCond %{REQUEST_URI} !^/admin/
|
||||
RewriteRule ^admin/(.*)$ /login.php?user=$1 [NC,E,END]
|
||||
|
||||
# В .htaccess:
|
||||
@@ -143,18 +143,14 @@ RewriteCond input_string pattern [flags]
|
||||
**Примеры:**
|
||||
```nginx
|
||||
# Условие: файл существует
|
||||
RewriteCond %REQUEST_FILENAME -f
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
|
||||
# Условие: не директория
|
||||
RewriteCond %REQUEST_FILENAME !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
|
||||
# Сравнение строк
|
||||
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
|
||||
|
||||
# Сравнение целых чисел (размер файла > 1024 байт)
|
||||
RewriteCond %REQUEST_FILENAME -s
|
||||
RewriteCond %{FILESIZE} -gt 1024
|
||||
|
||||
# Множественные условия с OR
|
||||
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [OR]
|
||||
RewriteCond %{HTTPS} off
|
||||
|
||||
Reference in New Issue
Block a user