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]

rewrite + redirect


  • To: <nginx-ru@xxxxxxxxx>
  • Subject: rewrite + redirect
  • From: "Grigory Ignatchenko" <grigory@xxxxxxxxxxxx>
  • Date: Mon, 29 Sep 2008 22:21:02 +0200
  • Content-language: ru
  • Thread-index: AckicORU/7qSEpTjTViUbWIey5GWPQ==

.

 

.htaccess, , .gif- :

 

===================================================

RewriteEngine on

RewriteBase /

Options +FollowSymlinks

RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d [OR]

RewriteCond %{REQUEST_FILENAME} -l

RewriteRule .* - [L]

 

RewriteRule ^pic1\/([a-zA-Z0-9]+)\.gif$ http://pictures.example.com/pic1/$1.gif [R=301,L]

===================================================

 

pic1 – symlink, example.com pictures.example.com.

 

ӣ nginx? :

 

location /pic1/ {

if (!-e $request_filename) {

rewrite ^pic1/([a-zA-Z0-9]+).gif$ http://pictures.example.com/pic2/$1.gif;

break;

}

}

 

, . ?



 




Copyright © Lexa Software, 1996-2009.