I need to redirect a whole WordPress site to a single WordPress page. A sort of maintenance mode, but the redirect has to go to a published WordPress page. Unfortunately, the maintenance page I need to show has to use other WordPress plugins.
I am not aware of any Maintenance Mode plugin which lets you do this. At most, they let you write custom HTML/CSS code.
I was thinking about a .htaccess mod_rewrite rule. However, I am very weak with mod_rewrite.
First, I disabled canonical redirects.
Then, I tried to use:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/index.php?page_id=813$
RewriteRule ^(.*)$ /index.php?page_id=813 [R=307,L]
However, these rules generate redirect loops. page_id=813
is the ID of my maintenance page, of course.
Is anybody aware of a maintenance mode plugin, which redirects to a published page?
Alternatively, can somebody help me to fix the mod_rewrite rules? Extra cheers if we can leave /wp-admin
out of the redirect rules.