On this page
You can still undo most .htaccess mistakes on shared hosting by renaming the file and restoring a backup. LiteSpeed reads Apache-compatible rules, so a bad rewrite often returns a 500 until you roll the file back. Keep a dated copy named .htaccess.bak before every edit, then make one change at a time.
Why .htaccess breaks a site
WordPress writes permalink rules into this file. Security plugins and page builders often add more lines later. Over time nobody remembers which rule 404s a path like /shop. A rewrite loop is the usual outage, not a full server failure. Comment new blocks with a short date so the next edit is easier to reverse.
Back up, edit once, then test
- Show hidden files in File Manager, or connect with SSH if you prefer the shell.
- Copy the live file to
.htaccess.bakbefore you change anything. - Make one change only. One HTTPS redirect beats three plugins plus a CDN rule plus this file.
- If the site returns a 500, rename the file out of the way, confirm the site loads, then restore a smaller version.
cp -a ~/public_html/.htaccess ~/public_html/.htaccess.bakcp -a keeps permissions and the original timestamp. Prefer MultiPHP INI for php_value settings on lsphp when you can. A blanket deny in the document root will 403 the whole site, so avoid that. More rules are not more secure; they usually mean more 500 errors. Stay specific.
Permalinks, AllowOverride, and Directory Privacy
Pretty permalinks need AllowOverride. Default cPanel vhosts already allow that. If /about 404s while /?p=12 still works, the file is missing or the rewrite block was removed. Directory Privacy is a separate cPanel feature and writes its own rules. Do not stack a second basic-auth block by hand unless you want a lockout.
When a blank page is worse than plain URLs
Ugly permalinks beat a blank page while you recover. Rename .htaccess so the site can load, confirm content returns, then put back only the rules you still need. Our nameservers stay ns1.logicweb.com and ns2.logicweb.com either way; this file only affects how the web server handles requests for your account.
Tagged
Was this article helpful?
Be the first to rate this article.



