According to the documentation here: http://www.iis.net/learn/extensions/url-rewrite-module/enabling-pretty-permalinks-in-wordpress
I assume you have already selected Post Name
in your permalink structure:
Then include this code in web.config
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
Related Posts:
- What is the difference between get_post_permalink and get_permalink?
- WordPress matching URLs with trailing tildes
- Rewrite Rule for Multilingual Website, Like qTranslate?
- How to use relative links on my pages?
- How to filter to output of the get_permalink() function
- Change slug on post creation
- WordPress Permalink changes to question mark (?) in URL
- Date based URLs for custom posts and pagination
- Archive permalinks
- Removing hierarchical pages in the permalink
- How to custom change author base without $this->front?
- Change permalinks structure for specific category
- Is It A Good Idea To Change Author Slug (user_nicename field) Directly In MySQL DB?
- + Character in permalink
- Custom post type by ID in root folder
- Permalinks Question: Adding a prefix ONLY in front of the posts
- Setting a permalink for the home page?
- Permalink redirection from ‘Day and name’ to ‘Post name’
- Replace WordPress %postname% suffix with %postid%?
- Move WordPress site from one domain to another
- Create slugs programmatically
- How to Remove -14 from WordPress URL (Permalink)
- WordPress 3.1 not compatible with jQuery Mobile?
- How to hook into permalink when publishing-saving post?
- Change permalink rule if category is called “uncategorized”
- Incorrect 404 for pages when using permalink, a static front page, and posts page
- Changing permalink changes stylesheet path?
- Multisite Network: How to change permalink structure programmatically on new blogs
- Get canonical link
- Custom Permalinks don’t work on local LAMP installation
- Problems redirecting to “pretty” permalinks (wordpress in Subdirectory)
- Remove permalink settings in post for users
- enable permalinks in window hosting
- If I change permalink structures, can I use htaccess to permanantly redirect links?
- Redirect parent taxonomy to it’s child
- WordPress Permalinks still not working despite all necessary settings
- RewriteRule accepts numbers but not letters in tag
- Avoid WordPress categorizing a permalink request as Not found 404 Page
- Pages not using permalink
- How to find the post_id of a post on a wordpress blog that uses pretty URLs?
- Redirects after permalink change
- WordPress permalink setup in Hindi
- How to remove /year/month from uploaded medias?
- Use custom post meta in permalink
- SEO: shortening permalinks to five words
- Remove -2 from URL; no duplicate pages, no images, no pages in trash
- Htaccess https 301 problem
- Add sku to product url woocommerce [closed]
- Press-This stopped redirecting to permalink after post publish
- Giving a new page an existing URL
- encoded search terms with %20
- Permalinks not working on new site
- Custom links in menus not working in multiple environments
- 404 permalink errors on Pages only
- Remove all stop words from old permalinks
- 404 error on all pages but custom post types are working OK
- using wp_redirect to redirect to a permalink
- old permalinks not found
- WordPress permalink from the database?
- Assigning proper permalink to blog that is part of a website
- Can I change the URL structure for a CPT only?
- Display parent page URL for child page
- How to set add_query_arg properly for home page?
- 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//)
- Make a post inaccessible without a unique ID in the URL
- 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
- Code snippet to add filter pre_post_link to change Media URL (post_type attachment permalink/slug)
- Custom Permalink (with category) for Pages
- Make query parameter an endpoint
- WP adding noopener and noreferrer to all links
- 301 redirects after changing permalinks
- Rename Custom Post Slug using taxonomy
- Link works although page was moved to another location
- Added a prefix in URL permalink structure but the old structure still working!
- Permalink of post redirect to uncategorized category
- Getting current page URL when default permalink is set
- WordPress All pages but home simply read “hello”
- Force/Limit the post/page slug to accept only url friendly characters
- Make Permalinks have a custom format?
- Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)
- permalinks of subcategory and posts
- Fresh wordpress installation in sub-directory not accessible
- Get link from wpe_excerpt “read more” and move it
- Define a Permalink Structure by Post and Page
- WordPress 4.0 beta – how to change the link URL in RSS feeds
- Folder Name and Category Name WordPress
- After changing permalink settings, everything works fine except for the two most recent posts
- Installing WordPress in another Install?
- using post meta data as permalink tags [duplicate]
- How to display post permalinks instead of pages?
- Incorporate single WordPress page into an existing static website [duplicate]
- How to configure WordPress to be a subdirectory of my main site as mymainsite.com/blog?
- Search points to /search/?s=KEYWORD instead of /search/KEYWORD
- Removing parent page in URL for one page
- Remove index.php from URL
- Siteurl code for links
- Permalinks get lost periodically
- Stymied by 500.5 error for WordPress on IIS 8 / Windows Server 2012