joomla: rewrite rule

Vadim A. Misbakh-Soloviov mva на mva.name
Вт Апр 3 14:35:20 UTC 2012


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

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'ов ?
>

----------- следущая часть -----------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20120403/af017824/attachment.bin>


Подробная информация о списке рассылки nginx-ru