ハマったのでメモ 先日、クライアントの本番サーバ上にtestディレクトリを作ってその中にテストページをアップロードするよう依頼された。 (http://foo.com/test/○○~みたいな感じ) しかし、ソースを確認してみると、全てがルートパスで書かれたソースだった。 このままtestディレクトリ以下にアップロードしたところで当然読み込まれない。。。 手動でなおすこともかんがえたのだけれど、自分が書いたものではなかったので どこまで直していいのかわからないし、何より面倒だった。 そこで、何か方法がないか調べてみると、どうやら.htaccessでなんとかできるっぽいのでやってみた。 他にもっとスマートなやり方があればぜひ教えてください。 画像を読み込ませる