I have a folder within a site that is a seperate web app than the parent. Both are working fine, but when I go to the domain.com/folder/ path, I would like it to forward me to domain.com/folder/index.htm for consistency. This is the htaccess rule I was trying, but it wasn't working for me and I am not sure what I did wrong.
RewriteRule ^folder/$ folder/index.htm
RewriteRule ^folder$ folder/index.htm
I tried these rules at the start and end of the rule list to see开发者_运维技巧 if anything was overriding and nothing appears to be.
You don't need Mod Rewrite for this. Instead, use DirectoryIndex:
DirectoryIndex index.htm
Place this file in the root of the folder you want this to apply to (e.g. domain.com/folder/)
精彩评论