# Подключение Parser-а для всех .html-страниц
AddHandler parsed-html html
Action parsed-html /cgi-bin/parser3.cgi
RewriteEngine on
## Русская версия
RewriteCond %{REQUEST_URI} ^/eng/
RewriteRule ^eng/(.*) $1&lang=eng [PT]
## Английская версия
RewriteCond %{REQUEST_URI} ^/ukr/
RewriteRule ^ukr/(.*) $1&lang=ukr [PT]
## обрезка html
#RewriteCond %{REQUEST_URI} \.html
#RewriteRule (.*)/(.*)\.html(.*) /$1$3&method=$2 [PT]
RewriteCond %{REQUEST_URI} \.html
RewriteCond %{REQUEST_URI} !^/nbs
RewriteCond %{REQUEST_URI} !^/jscript
RewriteCond %{REQUEST_URI} /admin/
RewriteRule (.*)/(.*)\.html(.*) /$1$3&method=$2 [PT]
RewriteCond %{REQUEST_URI} ^/admin/
RewriteCond %{REQUEST_URI} !/jscript
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|jpeg|png|css|js|cgi)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^admin/(.*) adm.html?uri=/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|jpeg|png|css|js|cgi)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.html?uri=/$1 [QSA,L]
DirectoryIndex index.html
<files "adm.html">
AuthType Basic
AuthName "Alex Admin"
AuthUserFile "/home/kyivpatr/.htpasswds/passwd"
require valid-user
</files>
Оставить комментарий