That’s handled by the redirect_canonical
function, set up as a default template_redirect
filter.
So it can be customized either by :
- a
template_redirect
filter, with a priority value lower than 10, so it runs before theredirect_canonical
function (which will eventually skip the next filters by making a redirect). - a
redirect_canonical
filter called by the function of the same name
Related Posts:
- How to identifty post from its URL in 404 page?
- Pretty permalinks for search results with extra query var
- Change link to other post to shortlink in the editor
- Random Alphanumeric Key URLs
- Does WordPress send a 301 header message when you change permalink structures?
- Problem duplicated shortlinks bitly
- Can’t get rewrite rules working
- Redirect /%year%/%monthnum%/%day%/%postname% [closed]
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Make custom post available under main domain directly?
- Why does enabling Permalinks make pages not found?
- using wp_redirect to redirect to a permalink
- Shortlinks work only for logged in users
- remove SLASH on single_post but KEEP on categories and parent pages
- Automatisation permalinks for each making of new page
- Use shortlink as permalink
- Rewrite Rule for Multilingual Website, Like qTranslate?
- Change slug on post creation
- WordPress Permalink changes to question mark (?) in URL
- Is there a user-facing interface to edit an attachment’s permalink?
- Can WordPress realistically handle a site with 500 ‘pages’?
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- stop redirection on /wp-admin call to /wp-login
- Get post title with link
- WooCommerce permalinks [closed]
- CPT archive 404ing when using a custom taxonomy name as a variable
- Performance and styles not working fine after changing permalink structure
- Maintaining two permalink structures
- Can’t change permalink url after hitting ‘ok’ and ‘update’
- Rewrite user profile URL to be human friendly
- removing index.php IIS 7.5 webconfig
- Sub-category and category in permalink structure
- Permalinks Messed up
- Permalinks broken regularly
- 404 Page Not Found for Only One Post
- How to 301 all posts
- WordPress within specific sub-directories, implicitly not root
- Call to a member function add_rule() on a non-object
- Link to blog index from template
- How to change Post ID during import
- Permalink change made author archive vanished
- Debugging permalink issue
- WordPress 404 in development area
- Custom Permalink
- why some permalinks adding characters/ruining links
- Multiple taxonomies on same permalink rule [closed]
- How to bulk edit image url in featured image and product description?
- WordPress category base not in post permalink
- What’s actually happening when permalinks for custom post types suddenly stop working
- Redirect a Blogger Page URL to wordpress
- Edit page slug after save, cause 404 by linked pages
- How to add .html to the end of the permalink
- IIS 7 Rewrite with parent categories
- Separate link structure for specific posts (/blog/glossary in stead of just /blog)
- WordPress rewrite_rules_array rule not working properly
- Return value of get_permalink(0) and get_the_title(0)
- Custom function making troubles in get_permalink for ACF relationship fields
- Two URLs of one post is available
- Will adding 40,000 301 redirects slow down a site?
- Pagination url for page template
- I Need to use Month , year in my all archives and pages of my wordpress site
- How to add post meta to post permalink with still keeping a good performance?
- home_url on IIS missing permalink index.php
- Page Navigation is not working with permalink structure
- Remove Parents From Permalink of Hierarchical Taxonomy
- Page URL not working due to physical directory
- Default Permalink Structure for Pages
- Gutenberg Editor: dynamically edit slug field based on ACF field
- Cannot Set Custom Permalinks for Multisite Post Migration
- Load-balanced site frequently losing permalink settings
- Problems fixing a REST API 404 after Moving my WordPress Directory and updating Permalink Structure
- Edit the output of a filter
- Custom Permalink Structure for The Events Calendar
- Redirect page to homepage, keeping URL
- Internal forward link with add_rewrite_rule
- Adding query string to multiple page urls in a WordPress function
- Change permalink structure with post id
- How to allow different authors to use same post slug?
- Updates all internal links on permalink update
- What permastrusture tags are generated out of the box right after creating custom post types and taxonomies?
- How can I add my own ‘read more’ or ‘after the jump’ type of link to the article page?
- Permalink Options does not change
- The permalink for the page doesn’t work and page’s defined link throws “Object not found!”
- How to change permalink structure and keep permalinks for old posts
- WordPress search seems to look into permalink (which is bad)
- whats is the perfect configuration to .htaccess for permalinks?
- Is there a way to remove the option to modify the Slug in post.php
- Issues with WordPress permalinks
- Select page/template from the permalink url
- Permalink / sub-template issue
- Mystery ghost page not appearing in Admin
- Update permalinks after domain change
- Comparing permalink to url
- Lists Top Authors by Most Recent Posts
- Add segment to URL in htaccess
- ugly URLs appear as 404 in GWT
- domain.com?p=POSTID permalinks not working with custom post types
- After migration works only first page
- Cannot find redirect – WordPress behind HTTPS proxy (Cloudfront)