Knowledge Base
MilesWeb / WordPress FAQ

How Do I Exclude A Folder From WordPress Permalinks?

Approx. read time : 2 min

The standard WordPress rewrite rules for permalinks might not work in some situations. For instance, they might not work if you have any other settings defined in .htaccess files present in the sub-folders.

In order to exclude the sub-folders from the WordPress rewrite rules, you must edit the .htaccess file and modify the line mentioned below in bold:

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

to

RewriteRule ./ /index.php [L]

This completes the process of excluding a folder from WordPress permalinks.

WordPress is an efficient software that is user-frinedly as well. If you have the right web hosting platform to support your website, you can create a powerful online presence. To get the best WordPress hosting platform, visit : https://www.milesweb.com/wordpress-hosting.php.

Save

Need help? We’re always here for you.