Parsing of the requested URL happens in the file wp-includes/class-wp.php
. The magic happens starting at line 148 in the parse_request
function. For path info style permalinks, $_SERVER['PATH_INFO']
is used, for pretty permalinks, $_SERVER['REQUEST_URI']
is used.
Related Posts:
- How to map permalinks with accented letters to sanitized slugs?
- Remove subfolders from URL
- custom naming of search permalink /search/
- Auto 301 to full post permalink? (using /posts/%post_id%/%postname%)
- Using WP rather than .htaccess to redirect pages/posts
- Remove the Parent category from the permalink but leave the child category
- Multilanguage URLs
- Rewrite my default post URL
- Why does chrome keep downloading a file instead of running the site?
- Permalinks: Page Not Found
- How to redirect to correct pages after permalink structure change
- Redirect a Blogger Page URL to wordpress
- URL rewriting: removing the site’s basename for a specific category
- Permalinks 404 error with HTTPS host
- How to rewrite a URL to another rewritten URL without changing the address?
- mod-rewrite exception? keep #hash in matching urls?
- Access or edit custom generated permalinks with WP_Rewrite
- Custom permalink structure with %postname% in front of domain name
- Problems with permalinks (.htaccess not working)
- Custom child page permalink
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- My permalinks for all pages and posts now include old page titles as parents/categories
- How to rewrite a folder in WordPress?
- Folder Name and Category Name WordPress
- Pretty permalinks for search results with extra query var
- Using $_GET variables in the URL?
- Including category-base in a post permalink results in 404
- WordPress thinks my custom route is a 404
- Move WordPress to subdirectory, keep ALL URLs
- Update URL Snippet to Canonical Permalink URL
- WordPress permalinks Yahoo hosting(no .htaccess allowed)
- How do I turn off 301 redirecting posts (not canonical)?
- Pretty Permalinks
- Remove parent slug for child pages
- Filtering comment permalinks when a condition is met
- Changing Permalinks to a Custom Permalink causes a 404 Error [no matter what I do]
- How can I Rewrite a ‘page’ URL based on query string parameters?
- Rewrite rule never matching
- Redirect user if it’s not logged in
- Random Alphanumeric Key URLs
- Custom url for a single page
- Rewrite URL for results of a custom WP_Query
- What happens when permalink settings are updated?
- Change of permalink structure – redirects in htaccess breaks the archive links
- Change permalinks with ACF values
- template_include not loading -instead goes to index.php
- How can I make my .htaccess file writeable by wp-admin?
- add new permalink structure from dynamic page
- Custom taxonomy rewrite using tax name instead of rewrite slug
- I need a custom permalink for my website
- 404 with post name permalinks
- Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?
- Permalinks not working
- Need Help Correct Regular Expression Redirect Code
- Add custom post type name in term link?
- add_rewrite_rule not working for me
- Using WP Rewrite, but just not “getting it”
- Force wordpress to display page with same url structure as categories
- is there a way to add the post URL to the results of fselect facet in Facetwp plugin?
- Rewrite CPT permalinks and include WPML language
- How can I get this custom post type permalink structure? %custom_post_type%-%taxonomy%-%term-postname%
- Do WordPress Permalinks Refer to a Lookup Table in the Database?
- 404 error using Meta for Permalink rewrite
- Allow Permalinks to Work with and without Hyphens
- How to handle paging/pagination with a custom permalink?
- Permalink for specific page name
- Comment author url link is wrong? How to change from authors/ to author/
- Custom URL rewrites for templates
- Redirecting “wrong” but working links to their canonical URL in order to prevent search engine penalties (e.g. /123/ at the end of URLs)
- WordPress not generating .htaccess but tells me that (Permalink structure updated.)
- How to change custom post type, blog post and page permalink by template?
- Ignore postname in permalink
- How can I set up a secondary permalink structure?
- How to enable http (not just https) in wordpress?
- How to get raw unwritten querystring
- How do I rewrite attachment urls when permalink structure contains %category%?
- How to change URL from /%postname%/ to custom-name/%category%/%year%/%monthnum%/%day%/%postname%/
- Adding a ‘blogs’ prefix in the URL structure but only for blogs
- WordPress Attachment Page URL Rewrite!
- .htaccess to redirect to a wp page
- Add #primary at the end of navlink permalinks on single posts
- Permalink structure /page/page/cpt-post gives 404 with pagination
- Rewrite posts url as they’re all children of a page
- a way to support totally different url structure
- Page permalink redirects to home page
- I can get the permalink or the excerpt to work correctly, but not both
- Dynamically populate permalinks
- When using number in url it is redircting to same page but when using character it redirects to 404
- WordPress permalink still not working (error or not understood?)
- customize urls displayed by previous_post_link and next_post_link
- Problem when i configure permalink
- custom permlink .htaccess file 404 Not Found error
- Files placed in directory with wordpress 404
- How to shorten the Permalink after WP>WP blog import?
- 404 not found error on WordPress local host
- .htaccess regex for redirect subdomain to root domain & redirect old permalinks
- how to create several url aliases for a page
- Add segment to URL in htaccess
- URL issues with WordPress
- Standard Htaccess directives disappear by themselves