parser

Написать ответ на текущее сообщение

 

 
   команды управления поиском

Ответ

Денис 02.07.2002 17:22

Вариант:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.+) /index.html [l]
циклит, вот кусок из лога:
...
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c0d00/initial] (2) init rewrite engine with requested uri /tpp.css
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c0d00/initial] (2) rewrite /tpp.css -> /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c0d00/initial] (2) local path result: /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c0d00/initial] (2) prefixed with document_root to c:/public_html/tpp/index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c0d00/initial] (1) go-ahead with c:/public_html/tpp/index.html [OK]
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c4d80/initial] (2) init rewrite engine with requested uri /img/0.gif
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c4d80/initial] (2) rewrite /img/0.gif -> /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c4d80/initial] (2) local path result: /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c4d80/initial] (2) prefixed with document_root to c:/public_html/tpp/index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c4d80/initial] (1) go-ahead with c:/public_html/tpp/index.html [OK]
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c5fc8/initial/redir#1] (2) init rewrite engine with requested uri /cgi-bin/parser3.exe/img/0.gif
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c5fc8/initial/redir#1] (2) rewrite /cgi-bin/parser3.exe/img/0.gif -> /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c5fc8/initial/redir#1] (2) local path result: /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c5fc8/initial/redir#1] (2) prefixed with document_root to c:/public_html/tpp/index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c5fc8/initial/redir#1] (1) go-ahead with c:/public_html/tpp/index.html [OK]
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c6e38/initial/redir#2] (2) init rewrite engine with requested uri /cgi-bin/parser3.exe/cgi-bin/parser3.exe/img/0.gif
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c6e38/initial/redir#2] (2) rewrite /cgi-bin/parser3.exe/cgi-bin/parser3.exe/img/0.gif -> /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c6e38/initial/redir#2] (2) local path result: /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c6e38/initial/redir#2] (2) prefixed with document_root to c:/public_html/tpp/index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c6e38/initial/redir#2] (1) go-ahead with c:/public_html/tpp/index.html [OK]
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c7db0/initial/redir#3] (2) init rewrite engine with requested uri /cgi-bin/parser3.exe/cgi-bin/parser3.exe/cgi-bin/parser3.exe/img/0.gif
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c7db0/initial/redir#3] (2) rewrite /cgi-bin/parser3.exe/cgi-bin/parser3.exe/cgi-bin/parser3.exe/img/0.gif -> /index.html
192.168.1.10 - - [02/Jul/2002:17:40:21 +0600] [tpp/sid#527188][rid#5c7db0/initial/redir#3] (2) local path result: /index.html
...
Попробовал вот такой вариант:
RewriteCond %{REQUEST_URI} !(/cgi-bin/parser3.exe/).*
RewriteRule !.*\.(gif|jpg|png|css)$ /index.html
работает.