.htaccess, save it, reload the page, and nothing happens. No 500 error, no redirect, no change at all. Clearing the browser cache does not help, and restarting Apache does not help either. When an edit produces no reaction whatsoever, the most likely explanation is that Apache is not reading the file in the first place.
The usual cause is a single directive in the server configuration: AllowOverride None. It tells Apache not to look for .htaccess files in a directory, so anything you write there is ignored without a warning. This walkthrough shows how to confirm that, find where the setting comes from, and rule out the other problem that looks exactly the same from the outside.
Prove whether Apache reads the file at all
.htaccess file, a line that is not a valid directive, such as ThisIsNotADirective.
If Apache reads the file, it cannot parse that line and returns a 500 Internal Server Error for requests under that directory. If the page still loads normally, Apache never opened the file.
This test briefly breaks the site for every visitor. On a live site, do it in a test subdirectory with its own .htaccess, or keep the window to a few seconds and remove the line immediately afterwards.
The error log tells you more than the browser does. Depending on the distro, it is usually under /var/log/apache2/ or /var/log/httpd/, or the vhost may define its own ErrorLog. A successful test leaves a line like this:
TEXT
# Illustrative output format (Apache 2.4 error log)
[core:alert] [pid N] [client 203.0.113.10:51234] /var/www/example/.htaccess: Invalid command 'ThisIsNotADirective', perhaps misspelled or defined by a module not included in the server configuration
[core:alert] [pid N] [client 203.0.113.10:51234] /var/www/example/.htaccess: RewriteEngine not allowed hereRule out the red herrings first
DocumentRoot points at public/ or public_html/, and the edited .htaccess sits one level away from where requests land. Also check the name: it has to be exactly .htaccess, not htaccess.txt or .htaccess.bak, which some editors and upload tools produce.
Check that Apache is the server reading it. If Nginx serves the site directly, .htaccess means nothing to it. If Nginx sits in front as a reverse proxy, Apache still reads the file, but Nginx may serve static files or cache responses before the request reaches Apache. LiteSpeed reads .htaccess with its own logic, so the Apache rules below may not map one to one there. On the support desk, this is often the first question worth asking: which process actually listens on port 80 and 443?
Finally, check that the request hits the vhost you think it hits. A request for a hostname that no ServerName or ServerAlias matches falls through to the default vhost for that IP and port, which may have a different DocumentRoot and different override settings.
Find the effective AllowOverride setting
AllowOverride is only valid inside <Directory> blocks (not <Location> or <Files>), and it controls which directive groups a .htaccess file may use. Since Apache 2.3.9 the default is None, which means that on a fresh 2.4 install .htaccess is ignored unless some block turns it on. Distro packaging usually adds its own blocks on top. Stock Debian and Ubuntu configs, for example, set AllowOverride None for /var/www/ in apache2.conf.
The tricky part is that several <Directory> blocks can apply to the same path. Apache merges plain <Directory> sections from the shortest path to the longest, so a block for /var/www/example/public overrides one for /var/www/, which overrides one for /. It does not matter much which file a block lives in. What matters is which block matches the deepest part of the path to your .htaccess.
These read-only commands show which vhost serves the site, which files are loaded, and every place AllowOverride appears:
BASH
# Debian / Ubuntu
sudo apache2ctl -S # vhosts, which file defines them, default vhost per IP:port
sudo apache2ctl -t -D DUMP_INCLUDES # every config file Apache actually loads
sudo grep -RnE 'AllowOverride|<Directory|DocumentRoot' /etc/apache2/
# RHEL / AlmaLinux / Rocky
sudo httpd -S
sudo httpd -t -D DUMP_INCLUDES
sudo grep -RnE 'AllowOverride|<Directory|DocumentRoot' /etc/httpd/-S: it names the config file and line where your vhost is defined. Open that vhost, note its DocumentRoot, and then look through the grep results for every <Directory> block whose path is a parent of, or equal to, the directory containing your .htaccess. The longest matching path wins. Ignore files that DUMP_INCLUDES does not list. A sites-available file that is not enabled, or a .conf.disabled file, has no effect no matter what it says.
Also watch for AllowOverrideList. It can permit specific named directives even when AllowOverride is None, so a narrow allowance there can explain why some lines in .htaccess work and others do not.
Missing module, or blocked override?
mod_rewrite can look exactly like AllowOverride None.
Many .htaccess files, including the standard WordPress block, wrap their rules in <IfModule mod_rewrite.c>. If the module is not loaded, Apache skips everything inside that wrapper silently. No 500, no log line, no rewrite. From the browser, it is indistinguishable from Apache not reading the file.
The broken-line test above separates the two. If the invalid line triggers a 500, Apache reads the file, and overrides are not the problem. Then check whether the module is loaded:
BASH
# Debian / Ubuntu: apache2ctl -M; RHEL family: httpd -M
sudo apache2ctl -M | grep -i rewriterewrite_module in the output means the module is not loaded. On Debian and Ubuntu it is enabled with a2enmod rewrite followed by a reload. On RHEL-family systems it is normally loaded through a file under /etc/httpd/conf.modules.d/.
If you remove the IfModule wrapper temporarily, a missing module stops being silent and produces the 'Invalid command' message naming RewriteEngine itself.
The third possible result is RewriteEngine not allowed here. That means Apache reads the file and the module is loaded, but the effective AllowOverride does not include the group that rewrite directives belong to, which is FileInfo. This happens when someone sets a narrow value such as AllowOverride AuthConfig for password protection only.
So the three outcomes map cleanly. A page that loads normally with the broken line means the file is not read. A 500 with 'Invalid command' on a real directive means a module is missing. A 500 with 'not allowed here' means the override exists but is too narrow.
Change it, then verify
<Directory> block wins, change AllowOverride there, or add a more specific block inside the vhost for the site's document root:
APACHE
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/example/public
<Directory /var/www/example/public>
# FileInfo covers mod_rewrite and redirect directives.
# Use 'All' only if the application needs auth, Options, or Indexes too.
AllowOverride FileInfo
# Rewrite rules in .htaccess need symlink following or they return 403.
Options -Indexes +SymLinksIfOwnerMatch
Require all granted
</Directory>
</VirtualHost>apache2ctl configtest (or httpd -t on RHEL-family systems) before reloading. A syntax error caught here costs nothing. A syntax error found by a reload can stop the service. Then reload with systemctl reload apache2 or systemctl reload httpd.
On control panel servers such as cPanel and WHM, the main Apache config is usually generated, and direct edits can be overwritten on the next rebuild. Check the panel's documented include files or templates for vhost customization before editing anything by hand.
There is a real trade-off in choosing the value. With AllowOverride None, Apache never checks the filesystem for .htaccess files, which saves a lookup in every directory along the request path and keeps directives out of a place where any site user can change them. With All, every directory is checked on every request, and anyone who can write to the web root can change server behavior for that path. A reasonable rule of thumb is to allow only what the application needs, typically FileInfo for rewrites, and on servers you fully control to consider moving the rules into the vhost and keeping overrides off.
To verify, remove the broken test line, then request a URL that your rule should rewrite or redirect, with curl -I against the actual hostname. A 301 or 302 with the expected Location header, or the right content on a rewritten path, means Apache now reads and applies the file. If you instead see a 500 after enabling overrides, the file is now being read and is reporting a real error inside it. For WordPress sites, that is a separate problem, covered in WordPress 500 Error Isn't Always .htaccess. Read the PHP Error Log First.
The practical habit is simple. When a .htaccess change does nothing, do not keep rewriting the rules. Prove the file is read with one invalid line, read the error log, and let the result tell you whether to look at AllowOverride, at loaded modules, or at which server and vhost the request actually reaches.