ПРОЕКТЫ 


  АРХИВ 


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: RewriteRule как правильно перепис ать ?



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
}


--
Best regards,
Andrew Kopeyko <kaa@xxxxxxxx>




 




Copyright © Lexa Software, 1996-2009.