I’m not sure if this helps but its good practice, include the BEGIN and END WordPress comments around your rules as well as the check for mod_rewrite:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Also:
- Do not apply these rules until you have chosen and saved permalinks in the admin area, only once you have done this should you setup the .htaccess file
- The Comments are used by plugins to allow rewriting of the htaccess file without messing up the core wordpress rules
- Make sure your rewrite base is set correctly
Related Posts:
- Redirect short-form URL to long-form URL (post_id to post_id + post_name)
- Custom Permalink
- corrupted URLs – can’t leave starting page
- remove SLASH on single_post but KEEP on categories and parent pages
- WordPress permalink still not working (error or not understood?)
- Rewrite Rule for Multilingual Website, Like qTranslate?
- Regex in add_rewrite_tag not accepting OR operators?
- How do I turn off 301 redirecting posts (not canonical)?
- Permalink/Pagination issue: Category base name same as page name
- + Character in permalink
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- How can I include a query string with get_permalink
- Nicest way to 301 Redirect traffic when changing permalink settings
- add_rewrite_rule with 3 or fewer matches?
- Create additional short URL with custom field and 301 redirect
- How to change URL structure for pagination pages?
- Rewrite rule never matching
- Stop redirecting to posts not in a category / duplicate slugs
- Random Alphanumeric Key URLs
- Using WP rather than .htaccess to redirect pages/posts
- rewrite_rule for custom post type doesn’t affect get_permalink
- Add ‘articles’ prefix before blog posts url without affecting pagination
- How to get wordpress link to fully evaluate when coming from facebook
- custom permalink/shortlink with base62 encoded post ID
- How to 301 all posts
- WordPress within specific sub-directories, implicitly not root
- query_vars in plugin not working?
- WordPress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
- Call to a member function add_rule() on a non-object
- Get canonical link
- Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?
- Re-write specific custom post type category URL to go to another page
- If I change permalink structures, can I use htaccess to permanantly redirect links?
- Redirect parent taxonomy to it’s child
- Rewrite Rule for default post type
- Does rename of page slugs create 301 redirects from old slug to new (same as for posts)?
- RewriteRule accepts numbers but not letters in tag
- Custom query var rewriting with only variable
- Date Archives’ Permalinks under Category folder
- add_rewrite_rule not working for me
- Using WP Rewrite, but just not “getting it”
- Change permalinks on move from one site to another
- Share same Slug for a Custom Post Type and 2 Taxonomies
- List / Get post redirects
- Redirects after permalink change
- How to 301 redirect from one url to another properly
- Rewrite CPT permalinks and include WPML language
- Redirect a Blogger Page URL to wordpress
- Custom permalink leads to index page
- Need To Add Custom rewrite base url for individual user
- Htaccess https 301 problem
- 301 Redirect for Non-Date Based URL’s
- Passing the JQuery string to Worldpress URL
- Permalinks only for posts
- rewrite rule to redirect to the most recent date permalink
- Permalinks settings
- How to test custom rewrite rules /permalinks?
- Permalink for PDF of article
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Comment author url link is wrong? How to change from authors/ to author/
- Strange behavior with a redirect loop – involves WPML multi-language plugin
- Adding URL prefix for foreign language support
- Redirecting “wrong” but working links to their canonical URL in order to prevent search engine penalties (e.g. /123/ at the end of URLs)
- Arabic permalink redirect to home page
- Getting an ID from a URL, why can WP do this itself, but none of of the functions provided get it right?
- Custom permalink structure with %postname% in front of domain name
- Configuring Home Page Address
- How can I set up a secondary permalink structure?
- permalink and add_rewrite_rule – error 404
- How to Use metada Value in Url and is it possible? [duplicate]
- Safest way to create a custom permalink
- How to redirect old permalinks from https://exmaple.com/category/post_id to https://exmaple.com/category/post_id.html
- Rewrite Post URL so it is constructed from parent post url & child post url
- Create different permalinks for same post
- Redirect old /%category%/%postname%/ to just /%postname%/
- why wordpress keeps redirecting to old page after deleting it?
- WordPress Multisite ABSPATH and get_home_path() to check for htaccess or web.config file
- Redirect page to homepage, keeping URL
- 301 redirects after changing permalinks
- Change permalink structure with post id
- Added a prefix in URL permalink structure but the old structure still working!
- how to have same rewrite rules for 2 different post type?
- Permalink structure /page/page/cpt-post gives 404 with pagination
- Custom Permlinks work, regular page permalinks don’t
- What permastrusture tags are generated out of the box right after creating custom post types and taxonomies?
- Rewrite posts url as they’re all children of a page
- Multiple Permalink Patterns for one page
- create user’s view profile link with username
- Where is wordpress redirecting wp-admin/admin/dashboard to wp-admin and how to turn it off
- changing permalink gives 404 error for old links
- Added incorrect rewrite rule now getting an error
- Why doesn’t WP update my .htaccess file?
- Only homepage working correctly, 404 error on everything else
- Removed and Reinstalled WordPress, Redirect Broken now
- Pagination is not working, how to trace it properly?
- standard post with extra parameter brings permalink problem
- redirect old pages by .htaccess
- Why are all pages redirecting to homepage when using custom permalinks?
- .htaccess regex for redirect subdomain to root domain & redirect old permalinks
- Add additional URL variations for a Post