| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > Администрирование Web серверов и Web служб > не срабатывает [L] в RewriteRule |
| Автор: Dima50 27.4.2010, 08:23 | ||||
| Здравствуйте! в .htaccess
Все работает test.ru/one1 => for_one.php test.ru/two2 => for_two.php теперь делаем так:
test.ru/one1 => for_two.php Почему не срабатывает ключь [L] когда: Stop the rewriting process here and don't apply any more rewrite rules. This corresponds to the Perl last command or the break command in C. Use this flag to prevent the currently rewritten URL from being rewritten further by following rules. Remember, however, that if the RewriteRule generates an internal redirect (which frequently occurs when rewriting in a per-directory context), this will reinject the request and will cause processing to be repeated starting from the first RewriteRule. Можте быть происходить Internal Redirect - но что это за зверь? по идее ключь [R] я не ставил. |
| Автор: Dima50 30.4.2010, 00:57 |
| Решение найдено: При срабатывание моде реврайт внутри хтакссес, хтакссес прогоняется 2 раза. почему описано подробно в Б, в А пример как избежать повторений RewriteRule. а) http://httpd.apache.org/docs/2.2/rewrite/rewrite_flags.html б) http://httpd.apache.org/docs/2.2/rewrite/rewrite_tech.html |