我正在尝试编写一个基本上执行此操作的 htaccess 文件:
if(requested file == "some-file.php" || requested file == "some-file2.php" || requested file == "some-file3.php")
then Rewrite to redirector.php?uri=some-file.php <- substitute requested file without passing any parameters
else
// existing rewrite conditions from silverstripe
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
这可以使用htaccess吗?