Skip to content

Commit 5358eb0

Browse files
committed
README: Usage with Cloudflare
1 parent 5b2a108 commit 5358eb0

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,25 @@ When active, visitors will see a friendly message indicating that the site is un
1010

1111
![Page preview](./assets/preview.png)
1212

13-
## Usage
1413

15-
1. Replace your main index file with these files during maintenance periods
16-
2. Customize the message in `index.html` if needed
17-
3. Modify colors and styles in `styles.css` to match your brand
14+
## Usage with Cloudflare
15+
16+
If you're using Cloudflare for your site, you can use the GH Pages url as the redirected landing page when your site is under maintenance.
17+
18+
This is a great way to keep your entire site:pages, assets, API etc. offline while you work on the maintenance.
19+
20+
1. Go to your Cloudflare dashboard and create a new page rule under Rules > Page Rules.
21+
2. Set the page rule url to *.yoursite.com/* and the destination URL to the GH Pages url (https://thinkdj.github.io/oops-kit/) so that all requests to your site are redirected to the maintenance page.
22+
![Cloudflare Page Rule](./assets/cloudflare_pagerule.png)
23+
3. Set the redirect type to "302 - Temporary Redirect".
24+
4. Save the page rule and disable it when your site is no longer under maintenance.
25+
26+
## Alternate usage
27+
28+
If you're not using Cloudflare, you can still use this page as a temporary landing page when your site is under maintenance by self hosting it on your own server.
29+
30+
1. Temporarily replace your main index file with these files during maintenance periods (`index.html` and `styles.css`)
31+
2. Customize the message in `index.html` and/or modify colors and styles in `styles.css` to match your brand if needed
1832

1933
## File Structure
2034

assets/cloudflare_pagerule.png

6.44 KB
Loading

0 commit comments

Comments
 (0)