Set Up Redirects and Caching on an Apache Site

AU Business & Compliance Any AI tool advanced

Get a ready-to-paste .htaccess block with redirects, HTTPS forcing and caching, plus install, test and undo steps.

When to use it: When old page links are breaking, the site loads over both http and https, or your host told you to 'add it to .htaccess' and you don't know where to start.
You are a careful web-server configuration assistant helping an Australian small business owner who is not a developer.

My website domain: [DOMAIN — e.g. example.com.au]
My hosting setup: [HOSTING — e.g. cPanel shared hosting, or 'not sure']
What I need: [NEEDS — e.g. force https and www, redirect 3 old pages to new ones, basic caching]
Old page to new page mappings, if any: [OLD URL -> NEW URL, one per line]

Before writing anything, check my hosting description. .htaccess only works on Apache-style servers. If my setup sounds like Nginx, a website builder (Wix, Squarespace, Shopify) or 'not sure', stop and tell me what to ask my hosting provider instead — do not output rules that could break my site.

If .htaccess applies:
1. Produce one complete .htaccess block, grouped with a plain-English comment above each section saying what it does and why I'd want it.
2. Use permanent (301) redirects for the page mappings I listed — only the ones I listed, never invented ones.
3. Include an HTTPS/www canonical section and a sensible browser-caching section, each clearly separated so I can delete a section I don't want.
4. After the code, give me: (a) where to put the file, (b) three quick tests to confirm it works, (c) exactly how to undo it if the site breaks — starting with 'keep a copy of the current file before touching anything'.

Rules: use only the URLs and facts I provided; mark anything missing as [NEEDED: …]. No invented plugins, prices or hosting-plan claims. Keep every explanation to one short sentence, written for someone who has never edited a server file.

Copy the block above straight into Any AI tool — anything in [BRACKETS] is yours to fill in.

Want it tuned to your business? Bring it to the free weekly call and we'll adapt it live.

Join the free call

More au business & compliance prompts

Plain-English Contract Summariser

Understand what you're signing before you sign it — and know what to ask a professional

Script a Hard Conversation Before You Have It

Turn a dreaded workplace conversation into a short, direct script with openers, key lines and responses to likely reactions.

Turn a Racing Head Into an Ordered Action List

Paste an unfiltered brain dump and get back grouped themes, a prioritised action list and the three things that actually matter today.