我试图在 apache 服务器上使用 .htaccess 文件将 /cmsfiles/flipbooks/thisFlipBook/ 指向 /thisFlipBook
我试过了:
RewriteRule ^/thisFlipBook/ /cmsfiles/flipbooks/thisFlipBook[L,R=302]
也:
RewriteRule ^/thisFlipBook/cmsfiles/flipbooks/thisFlipBook[L]
(没有 R 标签,以便 mod_rewrite 知道它是一个内部 apache 重定向,而不是让浏览器为重写的资源发送新请求。)
第一条规则导致 404,第二条导致:
/thisFlipBook/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/
但是,如果您手动导航到 /cmsfiles/flipbooks/thisFlipBook 它会设法找到 index.html 文件并成功加载它。
难道我做错了什么?
另外:服务器端 apache 重定向和卸载文件夹是正确的方法吗?客户开始请求如此多的翻书,为了部署,我们已将它们从项目中移出。