Guides tagged “htaccess”
Step-by-step MdmHost guides about htaccess, sorted A-Z.
31 guides · page 1 of 2
.htaccess on LiteSpeed: what works, what does not and how to fix rules
How LiteSpeed Web Server handles .htaccess files: supported directives, rewrite rules, PHP settings, unsupported modules and how to debug rules that do nothing.
.htaccess security rules: block IPs, disable directory listing and restrict folders
Copy-ready .htaccess rules for cPanel hosting: block or allow IP addresses, turn off directory browsing, protect .htaccess and config files, and stop hotlinking.
Add security headers with .htaccess on LiteSpeed (HSTS, CSP, X-Frame-Options)
Add HTTP security headers such as HSTS, X-Content-Type-Options, X-Frame-Options, Referrer-Policy and Content-Security-Policy to a site on LiteSpeed hosting with .htaccess.
Apache redirects with.htaccess: HTTPS, www and 301s
Write Apache redirects that work the first time. Force HTTPS, pick www or non-www, move single pages and whole domains with Redirect and RewriteRule, and avoid redirect loops.
Block IP addresses and ranges with cPanel IP Blocker
Stop attackers, spam bots and scrapers from reaching your website by blocking single IPs, ranges or CIDR blocks with cPanel IP Blocker, and remove blocks later.
Create custom 404, 403 and 500 error pages in cPanel
Replace the plain server error pages with branded 404, 403, 500 and other pages using cPanel Error Pages, server-side tags, or ErrorDocument rules in .htaccess.
Edit .htaccess in cPanel and create friendly URLs with rewrite rules
Show and edit the hidden .htaccess file in cPanel File Manager, then use mod_rewrite to build clean URLs, redirect pages and force www or non-www safely.
Enable HSTS to enforce HTTPS
Turn on HTTP Strict Transport Security (HSTS) safely: what it protects against, the header to add in .htaccess, choosing max-age, subdomains and preload risks.
Enable.htaccess and mod_rewrite in Apache
If your.htaccess rules are ignored, Apache is usually missing mod_rewrite or AllowOverride. Enable both, restart safely and prove it works with a one-line test rule.
Fix 404 Not Found errors on cPanel hosting
Find why pages return 404 Not Found on a cPanel site: wrong document root, case-sensitive file names, missing rewrite rules, moved pages, and custom error pages.
Fix a 500 Internal Server Error in WordPress
Troubleshoot a WordPress 500 Internal Server Error on cPanel: check error logs, reset .htaccess, fix PHP settings and permissions, and isolate plugins or the theme.
Fix a 500 Internal Server Error on cPanel hosting
Find and fix the cause of a 500 Internal Server Error on any cPanel site: broken .htaccess rules, wrong permissions, PHP version or memory problems and script errors.
Fix WordPress permalinks and 404 errors on posts
Fix WordPress posts and pages that return 404 while the home page works: re-save permalinks, restore the .htaccess rules and check rewrite conflicts in cPanel.
Force HTTPS for a domain in cPanel
Redirect every visitor to HTTPS with the Force HTTPS Redirect toggle on the cPanel Domains page or an.htaccess rule, then avoid redirect loops and mixed content.
Force HTTPS in WordPress the right way
Move WordPress fully to HTTPS: update the site addresses, redirect HTTP in cPanel or .htaccess, secure the admin, fix mixed content and avoid redirect loops.
Host a React, Vue or Angular single-page app on cPanel (fix 404 on refresh)
Deploy a built React, Vue, Angular or Vite single-page app to cPanel hosting and add the .htaccess fallback so deep links and page refreshes do not return 404.
How to fix 403 Forbidden errors in Apache
Fix Apache 403 Forbidden errors by checking Require rules, file permissions, a missing index file,.htaccess deny rules and SELinux labels, one cause at a time.
How to fix 500 Internal Server Error on Apache
Track down an Apache 500 Internal Server Error by reading error.log, then fix bad.htaccess directives, missing modules, PHP fatal errors and permission problems.
How to make.htaccess rewrites work in OpenLiteSpeed
Fix.htaccess rewrites in OpenLiteSpeed - turn on rewrite and Auto Load from.htaccess, understand why edits need a restart and which directives are supported, and fix 404 errors on WordPress permalinks.
How to migrate a website from Apache to Nginx
Move a site from Apache to Nginx with low downtime - convert virtual hosts and.htaccess rewrites, set up PHP-FPM, reuse SSL certificates, test on a spare port, then switch.
Browse by topic
- Getting startedYour first hour with a new server: access, logins and basics.69 guides
- cPanelFiles, databases, email, domains and every cPanel tool, step by step.37 guides
- WHM & resellingWHM, packages, reseller accounts, WHMReseller and running a hosting brand.49 guides
- WordPressInstall, secure, speed up, migrate and fix WordPress sites.40 guides
- Email & webmailMailboxes, webmail, forwarders, spam filters and email delivery.37 guides
- DomainsRegistering, transferring and managing domains and nameservers.20 guides
- SSL certificatesFree AutoSSL, Let's Encrypt, paid certificates and HTTPS.19 guides
- CloudLinuxCloudLinux setup and use: LVE limits, CloudLinux Manager, CageFS and PHP/Node.js selectors.31 guides
- LiteSpeedLiteSpeed Web Server, LSCache and the LiteSpeed Cache plugin: install, settings and tuning.30 guides
- Imunify360Malware scanning, firewall and proactive defence with Imunify360.23 guides
- SoftaculousInstall, update, clone and back up apps with Softaculous.23 guides
- WP SquaredcPanel's WordPress platform: sites, plugins, staging and backups.9 guides
- SitePadBuild and publish websites with the SitePad builder.9 guides
- SitejetDesign, edit and publish sites with the Sitejet builder.9 guides
- WHMResellerAlpha and master resellers with WHMReseller: install, setup and use.12 guides
- VirtFusionInstall, set up and manage VirtFusion: hypervisors, packages, servers and WHMCS integration.7 guides
- VirtualizorManage your VPS with Virtualizor: power, OS reinstall, VNC, IPs and backups.30 guides
- PleskWebsites, email, databases and settings in the Plesk panel.52 guides
- DirectAdminUsers, domains, email and reseller tools in DirectAdmin.40 guides
- WHMCSBilling, automation, products and client management with WHMCS.51 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.106 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.115 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.34 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.52 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.64 guides
- Billing & accountInvoices, renewals, the client area and your account.9 guides
- TroubleshootingWhen something is not working: checks and fixes.68 guides
- Linux VPSSSH, packages, services and everyday Linux administration.70 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.58 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.58 guides
Still stuck?
Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.
