.htaccess 如果点击,如何强制某个文件夹的URL为/index.html/
如果有人点击某个特定目录,我想强制URL为index.html。如何使用.htaccess执行此操作?您可以尝试以下规则:.htaccess 如果点击,如何强制某个文件夹的URL为/index.html/,.htaccess,.htaccess,如果有人点击某个特定目录,我想强制URL为index.html。如何使用.htaccess执行此操作?您可以尝试以下规则: RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_URI} !index\.html$ [NC] RewriteRule ^(.*?)/?$ /$1/index.html [L,R=301]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !index\.html$ [NC]
RewriteRule ^(.*?)/?$ /$1/index.html [L,R=301]