Exclude from wordpress rewrite rules
-
Attempting to exclude a folder ‘test’ from the wordpress rewrite rules in the htaccess file and give it a unique rewrite. Test isn’t a real folder.
So this:
/test/post1/or this/test/post1should rewrite to/index.php?pagename=$1where $1 is the posttitle e.g. post1. I think I have the exclusion working as a RewriteCond (see below) – how do I add the RewriteRule for it?# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_URI} !^/(test|test/.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress -
Hi there,
It looks like you have a self hosted WordPress.org website and not one hosted on WordPress.com.
This is the forum for WordPress.com.
For help with WordPress.org websites please see here:
https://wordpress.org/support/
To learn about the difference between the two please see here:
Hope it helps.
- The topic ‘Exclude from wordpress rewrite rules’ is closed to new replies.