/go/ を mod_rewrite で

| No Comments | No TrackBacks

時々ある
/go/blahblahblah を /product/whatever/index.jsp
とかいう感じで redirect してくれるあれを試した。

httpd.conf に以下の内容を追加。

RewriteEngine On
RewriteMap map txt:/usr/local/apache/conf/rewrite.txt
RewriteRule ^/go/(.*) ${map:$1} [L]

rewrite.txt に以下のように記述

a       http://foo/blog/1023/
b       http://bar/wiki/1025/

これで

/go/a は /blog/1023
/go/b は /wiki/1025

へリダイレクトされるようになる。

No TrackBacks

TrackBack URL: http://www.grid5.net/mt/mt-trackback.cgi/271

Leave a comment

About this Entry

This page contains a single entry by dxy published on 2005年10月 4日 16:04.

SSL 証明書 was the previous entry in this blog.

Equalizer 350 L7 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