将索引重定向到另一个地址栏不变的页面

redirect index to another page with address bar unchanged

我在 www.domain.com/subfolder/somepage.php and I need www.domain.com 有一个页面,可以在不更改地址栏上显示的地址的情况下转到该页面。

我试过了Redirect /index.php /subfolder/somepage.php 但地址栏也会改变。

非常感谢!

您可以使用 php 加载文件。

<php 
require_once '/subfolder/somepage.php';
?>

或使用 htaccess

代理它
RewriteCond %{REQUEST_URI} ^/index.php
RewriteRule ^(.*)$ /subfolder/somepage.php [P]