Apacheで、
http://sample.com/test.html
http://sample.com/test2/index.html
とアクセスできる状態で、
mod_rewriteをつかって
http://sample.com/test/
でtest.htmlにアクセスさせたいのですが、どうできるでしょうか?
末尾にスラッシュのない、http://sample.com/test
だと
text
1RewriteEngine on 2RewriteCond %{REQUEST_FILENAME} !-d 3RewriteCond %{REQUEST_FILENAME}.html -f 4RewriteRule ^(.*)$ $1.html [L]
でできるのですが、http://sample.com/test/
のまま行いたいです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。