Home > front end >  redirect index to another page with address bar unchanged
redirect index to another page with address bar unchanged

Time:09-17

I have a page at www.domain.com/subfolder/somepage.php and I need www.domain.com to route to it without changing the address displayed on the address bar.

I have tried Redirect /index.php /subfolder/somepage.php but the address bar will be changed as well.

Many thanks in advance!

CodePudding user response:

you can load the file using php.

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

or proxy it with with htaccess

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