Skip to content

Instantly share code, notes, and snippets.

@carlosleonam
Last active March 2, 2022 19:15
Show Gist options
  • Save carlosleonam/38d6cd6f1b0186f5b48d88b0855f2ddb to your computer and use it in GitHub Desktop.
Save carlosleonam/38d6cd6f1b0186f5b48d88b0855f2ddb to your computer and use it in GitHub Desktop.

Create Maintenance Mode in Adianti Template

Original:

Coming Soon 15

Copy all files into the '/maintenance' subfolder or whatever you like (this simplifies the use of .htaccess)

Copy actual .htaccess to .htaccess-ON

Create new .htaccess-OFF with the follow contents:

Options All -Indexes
Options +FollowSymlinks
RewriteEngine On

RewriteBase / # use it if appweb is in a root of domain
# RewriteBase /<folder_name>/ # use it if appweb is in a subfolder

## RewriteCond %{REQUEST_URI} !maintenance.html$
## RewriteRule .* maintenance.html [L]
## RewriteRule .* /maintenance.html [R=307,L]

RewriteCond %{REQUEST_URI} !assets/maintenance/index.html$
## RewriteRule .* assets/maintenance/index.html [L]
RewriteRule !^assets($|/) assets/maintenance/index.html [L]
@carlosleonam
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment