I have website content like
mysite.com/index.php
mysite.com/apps
Now I want to put a maintenance page so people who will visit to mysite.com or mysite.com/index.php will able to see maintenance page however visitors will go to mysite.com/apps or mysite.com/apps/index.php will not redirect to maintenance page.
I already tried these:
This is redirecting both root and subfolder to maintenance page.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
RewriteRule ^(.*)$ http://mysite.com/maintenance.html/$1 [R=301,L]
This is not doing anything
RewriteEngine on
RewriteCond %{HTTP_HOST} mysite\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
Rewriterule ^(.*)$ http://mysecondsite.com/ [L,R=301]