mod_rewrite

旧社名でのアクセスを振り向けなおしたり、http を https に向けなおす
rewrite rule をメモ。

<IfModule mod_rewrite.c>
    RewriteEngine on
    # www.oldcompany.com is deprecated
    RewriteCond %{HTTP_HOST}    !^www\.newcompany\.com [NC]
    RewriteCond %{HTTP_HOST}    !^$ [NC]
    # redirect http access to https
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^/(.*)          https://www.newcompany.com/$1 [L,R]
</IfModule>

About this Entry

This page contains a single entry by dxy published on 2005年10月22日 14:58.

de.lirio.us was the previous entry in this blog.

ISO 639 Language Codes is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 5.01