我有这个文件结构:
/
/index.php
/test.php
/example/foo/bar/test.php
/cache/index.htm
/cache/test.htm
/cache/foo/bar/test.htm
Run Code Online (Sandbox Code Playgroud)
/ cache/*中的所有内容都是生成的php文件的平面文件(.htm).
基本上我想做的就是 -
/index.htm(用户永远不会在他们的网址中看到.php,即使它是动态制作的)/cache/index.htm
存在.如果是这样,它从该文件中读取./cache/index.htm不存在,它服务于index.php另一个例子
/example/foo/bar/test.htm/cache/example/foo/bar/test.htm存在,它会从中读取/example/foo/bar/test.php(但没有看到.php扩展名)在.htaccess中这有可能吗?
谢谢
(顺便说一句,我在其他地方制作缓存文件.所以不需要在运行中制作它们)
.htaccess ×1