The reason that’s happening at all is because of content negotiation. /2011.html
wouldn’t normally be accessible through /2011/
, but content negotiation is making Apache automatically look for files named 2011
(whatever the extension) when it can’t find the folder before it passes control to WordPress.
This can be quite useful, but if you don’t particularly need content negotiation (WordPress itself doesn’t need it), you can turn it off by adding this to your .htaccess
:
Options -MultiViews
If that doesn’t work, or you do need content negotiation, you could rename the 2011.html
to something else, and use mod_rewrite to make sure the link still works. E.g. rename 2011.html
to happynewyear.html
and then add this to your .htaccess
(before the other RewriteRules):
RewriteRule ^2011\.html happynewyear.html [L]
Related Posts:
- remove “index.php” from permalinks
- Change author permalink
- How to remove dates from existing permalinks?
- “.#[random-char-string]” being inserted at end of URLs
- mod_rewrite enabled but Permalinks show index.php
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- How to map permalinks with accented letters to sanitized slugs?
- Without index.php in permalinks I get 404 across site
- add new permalink structure from dynamic page
- WordPress Permalinks still not working despite all necessary settings
- Server Move: All pages leading home
- Only default permalink is working mod_rewrite enabled
- How to remove specific category from URL in WordPress
- permalink results to “page not found”
- mod-rewrite exception? keep #hash in matching urls?
- .htaccess rewriterule being ignored – tyring to remove dates from WP posts
- Can’t get permalinks working!
- Permalink sub-routing catch-all
- Permalinks not working in WordPress
- WordPress Page Not Found if Permalink Settings is Postname
- Access posts while mod_rewrite is broken
- mod-rewrite rules grabs “broken permalinks”, too
- Need to capture “keyword” added to the end of the post, even with “pretty permalinks”
- Already have htaccess but permalink settings not working. Getting 404
- Changing permalink stops me from creating webpages
- How can I put WordPress in a directory but keep just the home page at the domain root?
- How to change permalink structure and keep permalinks for old posts
- Pretty permalinks (again)
- Only homepage working correctly, 404 error on everything else
- customize urls displayed by previous_post_link and next_post_link
- .htaccess not working in WordPress
- WordPress home page showing 404 error
- how to create several url aliases for a page
- Permalinks is not working in my wordpress setup
- Settings > Permalinks – mod_rewrite ineffective if expression not preceded by /index.php/
- where is permalink info stored in database?
- WordPress Permalink changes to question mark (?) in URL
- How would I create a different permalink structure for pages and posts?
- Change permalinks structure for specific category
- Is It A Good Idea To Change Author Slug (user_nicename field) Directly In MySQL DB?
- Why can’t I save permalink “360” for a page?
- Permalinks Question: Adding a prefix ONLY in front of the posts
- Create slugs programmatically
- Make attachment pages require a base url
- How to Remove -14 from WordPress URL (Permalink)
- Rewrite URL Parameter And Force ‘Pretty’ Permalink
- How to map a URL to a specific template?
- How to hook into permalink when publishing-saving post?
- Problem duplicated shortlinks bitly
- Incorrect 404 for pages when using permalink, a static front page, and posts page
- Is there a wordpress function that I can use to retrieve the current page that is loaded?
- Custom Permalinks don’t work on local LAMP installation
- Problems redirecting to “pretty” permalinks (wordpress in Subdirectory)
- Remove permalink settings in post for users
- Remove multisite “blog” slug from specific custom post type
- Redirect parent taxonomy to it’s child
- RewriteRule accepts numbers but not letters in tag
- Avoid WordPress categorizing a permalink request as Not found 404 Page
- Pages not using permalink
- Redirects after permalink change
- remove product-category base but still redirect to page with same permalink
- Process all virtual sub pages on parent page
- Correct permalinks and 404-error
- What would cause a theme to add extra characters to blog post links?
- Getting 404 when Access post which name start with Digit
- Custom permalink with two parameters
- Custom links in menus not working in multiple environments
- 404 permalink errors on Pages only
- What happens to the permalink that use %postname% if I change the post name
- Assigning proper permalink to blog that is part of a website
- What would cause a 500 Server Error with permalinks turned OFF?
- Changing permalinks back to default ( ?p=123 )
- permalinks on title tag
- How to redirect old permalinks from https://exmaple.com/category/post_id to https://exmaple.com/category/post_id.html
- Double Slash After Media Path (uploads//)
- New posts link to old posts (random)
- Undefined variable: testimonial in D:\Projects\PWP-WP\wp-content\themes\blankslate-child\template-parts\fields\flex\bottom-page-block.php on line 123
- Is it possible to set public to false for the native WordPress blog
- Custom Permalink (with category) for Pages
- 301 redirects after changing permalinks
- Post links broken after migration
- Rename Custom Post Slug using taxonomy
- Link works although page was moved to another location
- wordpress admin panel loop on nginx
- WordPress All pages but home simply read “hello”
- How to change link of an uploaded file to the media library
- On Macbook, my permalinks with post name don’t work. Returning 404 error
- WordPress pages break with custom permalink settings (theme directory not output)
- Remove /index.php from Permalink
- Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)
- Fresh wordpress installation in sub-directory not accessible
- Get link from wpe_excerpt “read more” and move it
- WordPress 4.0 beta – how to change the link URL in RSS feeds
- Folder Name and Category Name WordPress
- How to display post permalinks instead of pages?
- Search points to /search/?s=KEYWORD instead of /search/KEYWORD
- How to change pagination base from slash to query form?
- WP Custom Permalink Filter
- standard post with extra parameter brings permalink problem
- Siteurl code for links