Re: RewriteRule как правильно переписать ?
Alexey V. Karagodov
kav at karagodov.name
Wed Jul 15 12:22:33 MSD 2009
On 15.07.2009, at 11:32, Andrew Kopeyko wrote:
> On Wed, 15 Jul 2009, Da1VeR -- wrote:
>
>> Здраствуйте... есть такие правила:
>>
>> [ISAPI_Rewrite]
>> RewriteRule /catalog/(.*) /catalog/$1 [L]
>> RewriteRule /lib/(.*) /lib/$1 [L]
>> RewriteRule /skins/(.*) /skins/$1 [L]
>> RewriteRule /payments/(.*) /payments/$1 [L]
>> RewriteRule /images/(.*) /images/$1 [L]
>> RewriteRule /index\.php(.*) /index.php$1 [L]
>> RewriteRule /admin\.php(.*) /admin.php$1 [L]
>> RewriteRule ^(.*)$ /index.php?sef_rewrite=1 [I,L,QSA]
>>
>> как их переписать под nginx ?
>
> Наиболее быстро работающее решение - примерно такое:
>
> location /catalog/ {
> ...
> }
> location /lib/ {
> ...
> }
> location /skins/ {
> ...
> }
> location /payments/ {
> ...
> }
> location /images/ {
> ...
> }
> location /index.php {
> ...
> }
> location /admin.php {
> ...
> }
> location / {
- rewrite ^(.*)$ /index.php?sef_rewrite=1
+ rewrite ^ /index.php?sef_rewrite=1
>
> }
>
>
> --
> Best regards,
> Andrew Kopeyko <kaa at zvuki.ru>
>
>
More information about the nginx-ru
mailing list