###前提・実現したいこと
現在サブディレクトリイへのアクセスの際index.htmlを消してもアクセスができるように振り分けようと考えていますがうまくいきません。
例
http://www.test.com/a/
にアクセスすると
http://www.test.com/a/index.html
にアクセスとさせたいです。
.htaccessの設定のみでできると調べてみましたがなかなかうまくいきませんでした。
それと加え
http://www.test.com/
にアクセスした際は
http://www.test.com/a/index.html
へアクセスされる
としたいです。
あとはすべてのhtmlでphpが処理されるようにしております。
ご教授お願いいたします。
###該当のソースコード
ErrorDocument 401 http://www.test.com/a/index.html ErrorDocument 403 http://www.test.com/a/index.html ErrorDocument 404 http://www.test.com/a/index.html ErrorDocument 500 http://www.test.com/a/index.html # URL Rewrite RewriteEngine On Options +FollowSymLinks RewriteCond %{THE_REQUEST} ^.*/index.html RewriteRule ^(.*)index.html$ http://www.test/a/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^.*/index.html RewriteRule ^(.*)index.html$ http://www.test/b/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^.*/index.html RewriteRule ^(.*)index.html$ http://www.test.com/c/$1 [R=301,L] # www RewriteCond %{HTTP_HOST} ^(test\.com)(:80)? [NC] RewriteRule ^(.*) http://www.a.com/$1 [R=301,L] # 404 RewriteCond %{REQUEST_URI} !(^/$) RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.*) / [R,L] # PHP AddType application/x-httpd-php .html
###試したこと
上の現状が試した内容となっております。