What each rule type generates
Redirect one page emits Redirect 301 /old-page.html https://example.com/new-page/, with the old value reduced to a path and the new value used as given. Move whole site matches the host with RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.com$ [NC] and sends every request to the new base with the path preserved by $1. Redirect a folder turns ^old-folder/(.*)$ into /new-folder/$1, so deep links survive the move.
Force HTTPS, Force www and Remove www are host-level rules that use %{HTTP_HOST} and %{REQUEST_URI} so they work for any path. The www rules hard-code https:// in the target, which assumes your certificate covers both names. If it does not, fix the certificate before publishing. Remove www captures the bare host with ^www\.(.+)$ and reuses it as %1.
The trailing-slash rules check the filesystem first: Remove trailing slash skips real directories with !-d, and Add trailing slash skips real files with !-f, so /images/ and /style.css keep working. Hide extension is two parts: a redirect from /page.html to /page driven by %{THE_REQUEST}, and an internal rewrite that serves page.html or page.php when the extension-less file exists.
Order, flags and where the file goes
Apache evaluates .htaccess rules top to bottom and the L flag stops processing at the first match, so order matters. Put the HTTPS and www rules first so every later redirect already lands on the canonical host, then page and folder redirects, then the cosmetic trailing-slash and extension rules. The generator outputs rules in the order you added them, so arrange them that way.
The file belongs in the document root (often public_html or htdocs), and the server must allow overrides: AllowOverride FileInfo or All in the virtual host, which shared hosts enable by default. If a redirect never fires, that setting or a disabled mod_rewrite is the usual cause. Apache reads .htaccess on every request, so there is no restart, and a syntax error produces a 500 on the whole site until it is fixed.
- R=301 or R=302 sets the status; L stops further rules; NC makes the host match case-insensitive.
- Query strings are carried over to the new URL by both Redirect and RewriteRule unless you end the target with ?.
- In .htaccess context the leading slash is stripped before matching, which is why the patterns start with ^ and no slash.
Redirect loops and other failures
A loop means two rules keep sending the request back to each other, or one rule matches its own output. The classic case is forcing HTTPS behind a proxy that terminates TLS: Apache sees HTTP, redirects to https://, the proxy forwards HTTP again. The generated rule's X-Forwarded-Proto check prevents this, but only if the proxy sets that header. Cloudflare and most load balancers do.
To debug, keep the rule on 302, test in a private window so cached 301s do not interfere, and use curl -I to read the Location header of each hop. If a redirect works for the home page but not for deep URLs, a later rule with L is probably catching them first. If it works nowhere, check AllowOverride. Remove rules one at a time until the behaviour changes.
Chains are the quieter problem. http://old.com/page should arrive at https://www.new.com/page in one hop, not three. After a domain move, put the HTTPS and www rules on the new domain and make the old domain's rule target the final https://www form directly. Broken Link Checker lists every redirected link on a page along with its final URL, which is a quick way to spot chains.
When .htaccess is the wrong place
Nginx does not read .htaccess at all, and IIS uses web.config. For clean-URL rewrites on those servers, URL Rewrite Generator writes the equivalent location block or web.config rule. Static hosts and CDNs have their own redirect files or dashboards, and a redirect configured at the edge saves a round trip to the origin.
Even on Apache, a site with hundreds of one-page redirects is better served by a RewriteMap or by rules in the main server configuration, which is parsed once rather than on every request. For a handful of rules on shared hosting, which is what most people need, .htaccess is fine and the generator's output is enough.