-1
如何自动与htaccess的这种变化:mod_rewrite的/dir/index.html到/ DIR/
文件的index.html
/dir1/index.html -> /dir1/ (with 301 redirect)
/dir1/subdir1/index.html -> /dir1/subdir1/ (with 301 redirect)
...
/another_dir/index.html -> /another_dir/ (with 301 redirect)
/another_dir/another_subdir1/index.html -> /another_dir/another_subdir1/ (with 301 redirect)
等物理上的目录存在
此构造不支持子装订器和 /another_dir/another_subdir1/index.html将更改为/ another_subdir1/ – user2274259
它应该工作,因为'。*'捕获组包含正斜杠。你试过了吗?你的'.htaccess'文件在哪里? –
我htaccess的 AddDefaultCharset UTF-8 RewriteEngine叙述在 的RewriteCond%{REQUEST_FILENAME} -f 重写规则^(。*)/索引\ html的$ $ 1/[R = 301,L] – user2274259