0

I am trying to get a landing page to work while I am doing scheduled updates on my site.

So basically all my original files will still exist in the directory including my index.php file but I've added another index1.html, so whenever I do an update I just want to be able to un-comment a line in my .htaccess file and everything will redirect to the landing page.

In my .htaccess file I have:

Options -MultiViews
RewriteEngine on
RewriteRule ^(.*)$ index1.html?path=$1 [L,NC,QSA]

This works for me in so far as any file or sub-directory I go to like example.com/whatever will redirect but example.com will still go to the original index.php which is what I want to be updating.

halfer
  • 19,824
  • 17
  • 99
  • 186
Paddy Hallihan
  • 1,624
  • 3
  • 27
  • 76
  • Probably duplicated https://stackoverflow.com/questions/18406156/redirect-all-to-index-php-htaccess – marcramser Jul 24 '18 at 09:07
  • @marcramser hi thanks for your comment. I seen that Q&A earlier but unfortunately it does not solve my issue. It will do the same thing, as in rewrite any file or directory (example.com/whatever) but not the the main page (example.com) – Paddy Hallihan Jul 24 '18 at 09:14

1 Answers1

-1

This line did exactly what I wanted:

DirectoryIndex index1.html
Paddy Hallihan
  • 1,624
  • 3
  • 27
  • 76