2011-05-13 .htaccessで相対パス対応 cakephp mod_rewrite apache 例えば ../img/foobar/hoge.png を img/foobar/hoge.png にしたい 画像は、webroot/img/の中に全て入ってるという条件 RewriteRule ^.*\/((img|js|css)\/.*\.(png|gif|jp?g|js|css))$ $1 [NC,L]