Настройка mod_rewrite

0139

Guest
Настройка mod_rewrite

Подключил в Апаче это модуль, пишу в .htaccess:
RewriteEngine on
RewriteRule !\.(jpg|css)$ /www/index.php

В error.log Апач выдает ошибку:
[Tue Sep 24 12:24:10 2002] [error] [client 127.0.0.8] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: **/**/**/index.php

Где включать эти самые FollowSymLinks и SymLinksIfOwnerMatch. Документацию по mod_rewrite смотрел, но не особо внимательно. Ничего не нашел.

Вобщем, как проблему решить?
 

0139

Guest
Нашел где писать. Все прописал в httpd.conf, без использования .htaccess и поставил RewriteLog.

Пишу в адресной строке: http://адрес.ru/company/press-release/ и он по идее должен меня переписать меня на адрес http://адрес.ru/index.php, и судя по логу он это делает, но потом зацикливается на обработчике php/_php.exe. Вот текст из лог файла:
(2) init rewrite engine with requested uri /company/press-release/
(3) applying pattern '\.(jpg|css)$' to uri '/company/press-release/'
(2) rewrite /company/press-release/ -> /index.php
(2) local path result: /index.php
(2) prefixed with document_root to z:/home/greenbelt2.ru/www/index.php
(1) go-ahead with z:/home/greenbelt2.ru/www/index.php [OK]
(2) init rewrite engine with requested uri /_php/php.exe/company/press-release/
(3) applying pattern '\.(jpg|css)$' to uri '/_php/php.exe/company/press-release/'
(2) rewrite /_php/php.exe/company/press-release/ -> /index.php
(2) local path result: /index.php
(2) prefixed with document_root to z:/home/greenbelt2.ru/www/index.php
(1) go-ahead with z:/home/greenbelt2.ru/www/index.php [OK]
(2) init rewrite engine with requested uri /_php/php.exe/_php/php.exe/company/press-release/
(3) applying pattern '\.(jpg|css)$' to uri '/_php/php.exe/_php/php.exe/company/press-release/'
(2) rewrite /_php/php.exe/_php/php.exe/company/press-release/ -> /index.php
(2) local path result: /index.php
(2) prefixed with document_root to z:/home/greenbelt2.ru/www/index.php
(1) go-ahead with z:/home/greenbelt2.ru/www/index.php [OK]
(2) init rewrite engine with requested uri /_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/
(3) applying pattern '\.(jpg|css)$' to uri '/_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/'
(2) rewrite /_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/ -> /index.php
(2) local path result: /index.php
(2) prefixed with document_root to z:/home/greenbelt2.ru/www/index.php
(1) go-ahead with z:/home/greenbelt2.ru/www/index.php [OK]
(2) init rewrite engine with requested uri /_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/
(3) applying pattern '\.(jpg|css)$' to uri '/_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/'
(2) rewrite /_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/ -> /index.php
(2) local path result: /index.php
(2) prefixed with document_root to z:/home/greenbelt2.ru/www/index.php
(1) go-ahead with z:/home/greenbelt2.ru/www/index.php [OK]
(2) init rewrite engine with requested uri /_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/
(3) applying pattern '\.(jpg|css)$' to uri '/_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/'
(2) rewrite /_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/_php/php.exe/company/press-release/ -> /index.php
(2) local path result: /index.php
(2) prefixed with document_root to z:/home/greenbelt2.ru/www/index.php
(1) go-ahead with z:/home/greenbelt2.ru/www/index.php [OK]


Изначально настраивал Апачи по статье ~"Установка Apache + PHP4 + Perl + MySQL" (Как-то так называется).

Голова уже болит от этого mod_rewrite'а.
Мануал по Апачи прочитал (про mod_rewrite).
 

0139

Guest
Попробывал в httpd.conf отключить:

Action application/x-httpd-php "/_php/php.exe"

И тогда rewrite заработал, ну естественно, php не обрабатывается.

Так в чем же дело? Ё-моё...
 
Сверху