0
我有以下目录结构:重定向到根目录的index.php所有传入的请求
/.htaccess
/index.php
/subfolder1/.htaccess
/subfolder1/index.php
/subfolder2/.htaccess
/subfolder2/index.php
我想重定向所有请求的index.php。我想通过在/.htaccess文件中进行一些更改来实现这一目标。
e.g. /abc to be rewritten to /index.php
e.g. /subfolder1/index.php to be rewritten to /index.php
我该如何使用webroot/.htaccess文件来做到这一点?
我想这样做是因为我想在/index.php上显示一条消息,如'维护网站'。我想为网站上的所有子文件夹执行此操作。