• 15 апреля стартует «Курс «SQL-injection Master» ©» от команды The Codeby

    За 3 месяца вы пройдете путь от начальных навыков работы с SQL-запросами к базам данных до продвинутых техник. Научитесь находить уязвимости связанные с базами данных, и внедрять произвольный SQL-код в уязвимые приложения.

    На последнюю неделю приходится экзамен, где нужно будет показать свои навыки, взломав ряд уязвимых учебных сайтов, и добыть флаги. Успешно сдавшие экзамен получат сертификат.

    Запись на курс до 25 апреля. Получить промодоступ ...

Mod_rewrite и 500 ошибка

  • Автор темы Maxsimus
  • Дата начала
M

Maxsimus

Доброго времени суток ^__~

Возникла проблемма;
Windows, Apache,
LoadModule rewrite_module modules/mod_rewrite.so раскоментирован
и работает.


файл .htaccess
________________________________________________________
RewriteEngine On
#Замени (. \.)?mysite\.com/ url'ом твоего сайта
RewriteCond %{HTTP_REFERER} !^http://(. \.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Замени /images/no-hotlink.jpg на url подставной картинки
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/no-hotlink.jpg [L]
_________________________________________________________

И дальше
________________________________________________________________________________
__________

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, problem@shiftup.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------
error log.
________________________________________________________________________________
_______
[Tue Nov 24 03:26:19 2009] [notice] Apache/2.0.58 (Win32) PHP/5.2.3 configured -- resuming normal operations
[Tue Nov 24 03:26:19 2009] [notice] Server built: Apr 29 2006 17:47:10
[Tue Nov 24 03:26:19 2009] [notice] Parent: Created child process 3824
[Tue Nov 24 03:26:19 2009] [notice] Child 3824: Child process is running
[Tue Nov 24 03:26:19 2009] [notice] Child 3824: Acquired the start mutex.
[Tue Nov 24 03:26:19 2009] [notice] Child 3824: Starting 250 worker threads.
[Tue Nov 24 03:26:19 2009] [alert] [client 192.168.1.3] D:/forum/www/.htaccess: RewriteCond: bad flag delimiters
[Tue Nov 24 03:26:21 2009] [alert] [client 192.168.1.3] D:/forum/www/.htaccess: RewriteCond: bad flag delimiters
________________________________________________________________________________
__________

Чувствую, что упускаю что то.. помогите разобратся
 
M

Maxsimus

У меня на отладчике

другие варианты тоже дают 500-ю ошибку.

Также как и любая попытка задействовать Rewrite (ЧПУ и тд)
 
V

vital

а уверен что мод_реврайт установлен? Помимо того, что раскомментирован..
 
M

Maxsimus

info.php пишет
____________________________________________________________________________
Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_access mod_actions mod_alias mod_asis mod_auth mod_autoindex mod_cgi mod_dir mod_env mod_imap mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_userdir mod_php5
 
V

vital

Так, вообще в htacces'e не будет лишним прописать RewriteBase.
Далее, не могу понять зачем !^http://(. \.)?mysite\.com/ Выделенный слеш..
 
M

Maxsimus

Вот
___________________________________
DirectoryIndex index.php
#Options -Indexes
RewriteBase
RewriteEngine On
#Замени (. \.)?mysite\.ru/ url'ом твоего сайта
RewriteCond %{HTTP_REFERER} !^http://(. \.)?mysite.ru/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Замени /images/no-hotlink.jpg на url подставной картинки
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/no-hotlink.jpg [L]
_______________________________________________________

Таже 500-ая
Это кстати самая часто встречающаяся проблемма с Apache for (Win32)

Log теперь ругает
______________________________
[Wed Nov 25 16:53:25 2009] [notice] Apache/2.0.58 (Win32) PHP/5.2.3 configured -- resuming normal operations
[Wed Nov 25 16:53:25 2009] [notice] Server built: Apr 29 2006 17:47:10
[Wed Nov 25 16:53:25 2009] [notice] Parent: Created child process 2704
[Wed Nov 25 16:53:25 2009] [notice] Child 2704: Child process is running
[Wed Nov 25 16:53:25 2009] [notice] Child 2704: Acquired the start mutex.
[Wed Nov 25 16:53:25 2009] [notice] Child 2704: Starting 250 worker threads.
[Wed Nov 25 16:53:25 2009] [alert] [client 192.168.1.3] D:/forum/www/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Wed Nov 25 16:53:27 2009] [alert] [client 192.168.1.3] D:/forum/www/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Wed Nov 25 16:53:30 2009] [alert] [client 192.168.1.3] D:/forum/www/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
______________________________________________________________________________


какойто взаимо-исключающий процесс образовался
что то конфликтует, такие вещи обычно со стороны виднее..
 
M

Maxsimus

Вопрос снимается, всё получилось.
Попутал пару знаков на самом видном месте.. ;)

Надо чаще отдыхать :trash:
 
Мы в соцсетях:

Обучение наступательной кибербезопасности в игровой форме. Начать игру!