ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: joomla: rewrite rule



Ну, вообще, у меня, например, всё работает и с:

location / {
        try_files $uri $uri/ /index.php?q=$request_uri;
}



02.04.2012 22:58, Alexey Wasilyev написал:
> Добрый день.
>
> Переношу сайт на джумле с апача на nginx. В .htaccess есть следующий код:
>
> RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
> # Block out any script trying to base64_encode crap to send via URL
> RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
> # Block out any script that includes a <script> tag in URL
> RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
> # Block out any script trying to set a PHP GLOBALS variable via URL
> RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
> # Block out any script trying to modify a _REQUEST variable via URL
> RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
> # Send all blocked request to homepage with 403 Forbidden error!
> RewriteRule ^(.*)$ index.php [F,L]
>
> посоветуйте, как его адаптировать под nginx без if'ов ?
>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.