Excluding Folders from WordPress Permalinks

You are here:

Only use if you are an advanced user.

There are some cases in which the default WordPress rewrite rules for permalinks may not work. For example, when you have other settings defined in .htaccess files located in subfolders.

To exclude these subfolders from the WordPress rewrite rules, you should edit the .htaccess file and change the bold line below:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

to

RewriteRule ./ /index.php [L]

Was this article helpful?
Dislike 0

October 17, 2022,

Rob Jennings

After sitting through a meeting filled with talk of “customer‑centric core competencies,” he decided there was a better way to do digital. He now leads a results‑driven agency that replaces buzzwords with clear thinking, strategic marketing, and practical business advice—helping organisations use the web intelligently to support real growth.