Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rewrite
- To: nginx-ru@xxxxxxxxx
- Subject: rewrite
- From: "Andrey V. Dudarev" <xxshestak@xxxxxxxxx>
- Date: Thu, 01 Apr 2010 13:19:54 +0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:x-stationery:content-type :content-transfer-encoding; bh=gtnUbS9O43rEov7EbteGq/T/kVGTlYc+kXpqz6aiRXo=; b=Gk5B7ATbrmD3bHx259gD1dbBvdb+lKkGSMClmDObyysQNjfanJ+bnseMozNFWTeSyS heHVk1W6bq+q90eNvyioHmcIdKmhGkRi8j4xYDfx/rZLlGfXu8X/qDuNssHAvoSAB1E1 4bjXuWhFsxnJKtwp86nnlAnNtPodSaXbZ4IFU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-stationery:content-type:content-transfer-encoding; b=vlC0MJG23NZiB/ilPewRwMAJwqVTuw5nRL9+2rFMVVCIqtyA8Vx7c6Jrs0cXBvpKy8 0yQtg2jURXMY3O0iTPnrhRtdhMolFYODWoeAKIZGbyHZR0QM+/U5EqWYzwjvYtLl6lEj ougyAZ4e0Vgzkfdk5gFT+CgUjXihNIWxbVQLw=
- Resent-date: Thu, 1 Apr 2010 13:25:47 +0400
- Resent-date: Thu, 01 Apr 2010 13:25:47 +0400
- Resent-from: Igor Sysoev <igor@xxxxxxxxx>
- Resent-message-id: <20100401092547.GB79331@xxxxxxxxxxxxx>
- Resent-to: nginx-ru@xxxxxxxxx
День добрый,
подскажите как переписать вот эти правила под nginx
<VirtualHost 127.0.0.1:92>
DocumentRoot /srv/www/htdocs
ServerName my-domen.com
RewriteEngine On
RewriteRule ^/(index[\.a-z]*)?$ http://www.mydomen1/dc-index.html [P]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.htm !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ http://www.mydomen1.com/$1 [R=301,L]
</VirtualHost>
Смысл их в том, что клиент запрашивает адрес my-domen.com
А в браузере отображается mydomen1.com, контент берется из opencms.
Спасибо.
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|