動的URLを静的URLにする

一言で言えば「URLの偽装」です。
httpd.conf に書くとこんな感じです。
.httaccess に書くときは中身だけを書きます

<Directory "/var/www/vhosts/mint410.com/httpdocs">
    <IfModule mod_rewrite.c>
        RewriteCond %{HTTP_USER_AGENT} ^UP\.Browser [NC,OR]
        RewriteCond %{HTTP_USER_AGENT} ^KDDI [NC,OR]
        RewriteCond %{HTTP_USER_AGENT} DoCoMo [NC,OR]
        RewriteCond %{HTTP_USER_AGENT} J-PHONE [NC,OR]
        RewriteCond %{HTTP_USER_AGENT} voda [NC,OR]
        RewriteCond %{HTTP_USER_AGENT} SoftBank
        RewriteEngine on
        RewriteBase /
        RewriteRule ^/images/$ - [L]
        RewriteRule ^/uploadedimages/([0-9]+)/?([0-9A-Za-z,-_]+)$ /uploadedimages/$1 [L]
        RewriteRule ^/img/$ - [L]
        RewriteRule ^/js/$ - [L]
        RewriteRule ^([0-9A-Za-z]+)/$ /redirect.php?id=$1 [L]
        RewriteRule ^([0-9A-Za-z]+)$ /redirect22.php?id=$1 [L]
        RewriteRule ^([0-9]+)/c/$ /comment.php?id=$1 [L]
        RewriteRule ^([0-9A-Za-z,-_]+)/p/$ /profile.php?gid=$1 [L]
        RewriteRule ^([0-9A-Za-z,-_]+)/f/$ /bookmark.php?gid=$1 [L]
        RewriteRule ^([0-9A-Za-z,-_]+)/g/$ /bookmarkR.php?gid=$1 [L]
        RewriteRule ^([0-9A-Za-z,-_]+)/([0-9]+)/?([0-9A-Za-z,-_]+)$ /blog.php?gid=$1&id=$2&$3 [L]
        RewriteRule ^([0-9A-Za-z,-_]+)/s([0-9]+)/$ /blog.php?gid=$1&id=s$2 [L]
        RewriteRule ^([0-9A-Za-z,-_]+)/$ /blog.php?gid=$1 [L]
    </IfModule>
</Directory>

コメントを残す