Plain permalinks of the form /?p=14523
(or /index.php?p=14523
) don’t necessarily need any .htaccess
file since they don’t require mod_rewrite to rewrite the URL (unlike the the custom permalinks you mention).
However, for a URL of the form /?p=14523
(as opposed to /index.php?p=14523
), where you don’t explicitly state the index document (ie. index.php
) in the URL then the DirectoryIndex
must be correctly set on your server. This can be achieved in .htaccess
using the following directive:
DirectoryIndex index.php
Normally, this is set by default on most servers, but sometimes it is not.
Related Posts:
- 301 (static page instead latest posts)
- When changing pages to posts, how do you set up 301 redirects for the page URLs?
- When WP_Query only returns 1 post, how do I automatically redirect to that post?
- How to 301 redirect from url with post id to permalink with post name (slug)?
- 301 Redirecting posts without %postid% (just %post_name%) in permalink to ones with %post_name%_%postid%
- Post pages are redirecting to the 404 page in wordpress
- Permalink issue with new blog posts > getting 301 redirect
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Test site pages go to main site
- Comment author url link is wrong? How to change from authors/ to author/
- Custom Permalink Structure for Pages & Posts
- custom word in custom permalink structure
- WordPress 302 Redirect to Random Product/Post/Page
- register_post_type permalink
- Updating permalink structure using ‘post_link’ filter results in 404 error for posts
- change WordPress permalinks and redirect new urls 301
- Post is blank when I click on the link
- Custom permalink for each post
- Unabled to Change Permalinks – Even Using the “Edit” (Resets to Original Permalink on “Update”)
- Custom permalink structure with %postname% in front of domain name
- Configuring Home Page Address
- Post/page title to permalink transformation – what is behind the scenes?
- Post titles and thumbnails as links to custom post types?
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Link post images to post
- Making posts permalinks consistent numbers
- add_rewrite_rule and template redirect not working
- Can Permalink structure of %postname%/%post_id% improve performance
- How to link post titles on page A to its posts on page B?
- Problems with WordPress in subfolder, posts show a blank page
- how to create a sub section in posts
- Categories Listing and Highlighting current category item
- Standalone form does not post to the url when form fields are populated (otherwise it does)
- Changing permalink of WordPress
- Rewriting blog permalinks
- Set Default Post as Parent Child (Nested) Relation
- Creating a redirect option for current page url
- How can I add random alphabets in wordpress permalink posts structure
- Change permalinks for posts & for custom post types
- How Do I Redirect WordPress Pages but not posts?
- Remove subcategory slug from url
- Can I show category name in url for only one of my categories?
- Permalink Short code showing unnecessary link text inside the loop
- Please help a newbie with blog page issue?
- Every time I try accessing a post it redirects me to the feed
- My post permalinks are redirecting to the post archive page for some reason?
- How can I make a post sub link?
- Redirect old Posts URL to new URL
- On the online version of my blog posts disappear
- How do you change the permalink for posts for a single category?
- Private post caught in endless redirect loop
- Redirect to custom post if custom archive page has just one result?
- How to set the post permalink using the WordPress REST API?
- Does having category name in permalinks affect SEO when having a post in multiple categories?
- WP posts using index.php instead of single.php
- How to add a ‘News’ section to specific posts in WordPress
- unable to display two post per page in wordpress front-page.php
- Add a url parameter to the current post and read it in a shortcode
- Submit New Post
- How can I set the permalink of an article / page equal to the permalink of an existing article / page?
- Prevent Archive URLs
- Custom Post Types and Broken Permalinks
- sometimes on saving a post as draft, it says Access Denied You don’t have permission to access “mywebsite.com/wp-admin/post.php”
- How to redirect if is post edit or publish page?
- Custom permalink for wordpress page / post
- Permalink structure for two seperate blogs
- How to add category base prefix to wordpress permalink
- Category URL to use same string as Post URL Permalink
- My post permalinks are always the same
- how to redirect page after delete post inside a post page?
- Permalink base only for posts
- Change the URL of posts by category
- WordPress Category url redirects to subdomain
- How to give priority to page than to posts permalink structure?
- Append a random string to a post permalink
- Point users to a specific url directory for some posts
- redirect 301 with special character like WIX site “#!”
- Precedence of page permalinks over woocommerce product category links?
- Post & Category Archives URL structure
- Fixing the WP Post Object for Custom Route
- issue in wordpress auto delete post and redirect to another 1
- post_name is not stored until post is published… where should I store my slug until it goes live then?
- Can’t access WordPress site in subfolder possibly because of .htaccess redirect from root installation?
- All my posts don’t show, only the headline is displayed on the homepage
- How to change post template via url?
- Posts in Page – How to customize the URL?
- Is there a way to change the complete URL of the blog post for a redirecting tracking link?
- WordPress with static posts page and custom permalink structure doesn’t find posts with numeric permalinks
- Use a custom post URL that is outside the blog root directory
- Can’t seem to replicate permalink structure for localhost development site
- WordPress rewrite url help needed
- Permalink of some posts change
- My posts section for logged in user
- Change link to permalink inside post content
- One of my posts is displayed as page
- Make assigning post to a specific category equivalent to assigning it to all categories
- How to mix pages and sub-categories in a url
- Removed and Reinstalled WordPress, Redirect Broken now
- Modifying the permalink href for posts with jquery
- Changing permalink of custom category