I have a domain test.com
Now i have the latest files in test.com/backup/
Now , what i need is, when i type test.com
In index.php,
header('Location: /backup/');
exit;
Add this to your htaccess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.test\.com$
RewriteRule ^$ http://www.test.com/backup/ [L,R=301]
If you want it to be silent:
RewriteEngine on
RewriteRule ^(.*)$ /backup/$1 [L,NC]
This will make http://test.com/ appear to contain the files inside /backup/ without having backup
in the url
In your .htaccess file put:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^test\.com$
RewriteRule (.*) http://www.test.com/$1 [R=301,L]
RewriteRule ^$ backup [L]
Add this to your .htaccess
RewriteRule ^(.*)$ http://www.test.com/backup/ [QSA,L]
in your .htaccess file:
Redirect 301 / /backup