LoginSignup
20
18

More than 5 years have passed since last update.

Apacheでズンドコキヨシ

Posted at

現在のURLの末尾にランダムで「ズン/」「ドコ/」のどちらかを追加したURLにリダイレクトし、URLの末尾が例のパターンになったら「キ・ヨ・シ!」と表示します。

zundoko.conf
Listen 8000

<VirtualHost *:8000>
    DocumentRoot /home/zundoko
    AddDefaultCharset UTF-8

    RewriteEngine On

    RewriteMap zundoko rnd:map_zundoko.txt

    RewriteRule \/ズン\/ズン\/ズン\/ズン\/ドコ\/$ /kiyoshi.html [L]
    RewriteRule (.*) $1${zundoko:zundoko}/ [R]
</VirtualHost>
map_zundoko.txt
zundoko ズン|ドコ
kiyoshi.html
<body>
<p style="margin: 80px 0; text-align:center; font-size:100px">キ・ヨ・シ!</p>
<body>

apache-zun-doko-kiyoshi.gif

20
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
18