/gist:f8b6f8b391a2f3d9b419 Secret
Created
April 7, 2015 20:23
Star
You must be signed in to star a gist
WordPress htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteRule ^rss.xml$ /index.php?feed=rss2&cat=-847 [L,R] | |
RewriteRule ^snippets.xml$ /index.php?feed=rss2&cat=847 [L,R] | |
RewriteRule ^feed/$ /rss.xml [L,R] | |
RewriteRule ^category/(.*)\.html$ /category/$1/ [L,R] |
svandragt
commented
Jun 25, 2015
- change 847 with the category ID that you status posts get assigned to
- Your code caused a redirect loop for me, the following code did what I wanted (I included a bit more context)
- The rules depend on the permalink structure (mine currently is: /%year%/%monthnum%/%postname%)
- It seems to work best when the rules are places before the BEGIN/END Wordpress comment blocks as these are replaced when the permalinks structure changes, as below:
@svandragt Thanks for including your notes and a more complete example!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment