index.php acts as a router. All requests are sent through index.php which looks up the rules in the database and directs you to the correct location. This should give you an idea of how a PHP router works. The .htaccess just removes index.php from the URL. More rules can be created using the WP_Rewrite class.
Related Posts:
- add_rewrite_rule: $matches var not replaced by captured value
- Custom permalinks with NextGEN Gallery
- How to change default page slug?
- Will references to ugly links automatically redirect to their pretty url permalink?
- How do I add a add_rewrite_rule without it redirecting?
- WP Login forms action URLs displayed as pretty URLs in browser (ex with Restore Password)
- Sub domain redirection to taxonomy
- Redirecting all old links from previous EE site to new WP site in one go?
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- Rewrite WordPress Custom URL
- WordPress removes spaces in URL on pagination
- Custom rewrite rule
- Home page with Polylang redirects to other page [closed]
- expecting 404 but redirecting to post with url subdirectory in post title
- Alias ‘wp-content’ directory to something shorter (framework?)
- Is there a ‘rake routes’ for wordpress?
- Remove Query String from URL on Redirect – Redirection Plugin
- add_rewrite_rule fro html to another url not working
- Double domain name in category URL-s
- WordPress redirects non-existing url to existing ones – how to disable
- Rewrite Preview URL to include index.php
- How to disable URL rewriting for specific URLs?
- Can I change default registration link (without htaccess)?
- How do I display only the parent page in the url
- How to remove wordpress directory slash
- Wildcard forward all posts and pages with few exceptions
- Redirect HTTP to HTTPS for all sub domains (blog posts)
- How to redirect large amount of URLs?
- Redirecting /px/?q=x to /px/x/
- URL redirect on updating the post date
- How to redirect a link to a new link?
- Rewrite vs Redirect from ?p={ID}
- 301 Redirect all posts urls from .html to / (without .html)
- Is WordPress API visible from PHP file called in htaccess
- Re-directing URLs with dates to URLs without dates
- Redirect htaccess [closed]
- How to redirect Webp files?
- 301 Rewriting htaccess
- 404 redirect based on url
- WordPress 3.1.2 Network Enabled non-www to www
- Redirect to new domain that serves new and different content
- Redirect users with “.” (dot) in their username and replace with “-” (dash) to correct profile
- Redirect empty search to another page
- Remove part from dynamic url and redirect
- Fresh install redirects to www, breaking page loads
- Broken page redirect
- Make URL like /fr/something display same as /something
- Remove trailing slash
- taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
- Error 404 wordpress redirecting URL
- How to create short urls for sharing and downloadable content?
- Redirect A URL Pattern In WordPress Using .htaccess
- URLs ending with number higher than 2147483647 redirects to to domain.com/2147483647
- Migration from old CMS to WordPress 301 redirection rules?
- Changes done to .htaccess are not getting reverted back
- How to change search url produced by ‘s GET method?
- Using .htaccess to redirect /da/ to / in URL
- openlitespeed rewrite rules conversion from apache
- Allow requests to resources outside the wordpress folder
- How to add custom rewrite rule to .htaccess?
- How to show the same content on multiple URLs?
- How to seamlessly redirect between different archive and singular slugs?
- Why does wordpress still strip my query var?
- When to call `add_rewrite_rule` for safety
- Rewrite Rule for Post “Subpage”, with pagination
- Change WordPress comments url / word
- Cache issues with redis and nginx
- How to properly rewrite url by custom var
- How to use URL structure to call PHP code
- Can I have /blog and /foo and /bar all point to the same blog?
- Append a value to a certain page’s URL before page load
- Different URL rewrite rules loading the same page
- Cannot access wp-admin without trailing slash – .htaccess configuration for WordPress behind a nginx proxy
- Help with Rewrite Rule for Custom Post Type with Query String
- Create Dynamic SEO Friendly URL for Virtual Page
- add_rewrite_rule with query variables
- How do I Redirect a WordPress Page?
- Having WordPress control only certain pages with .htaccess?
- Help with a custom rewrite
- My bbPress rewrite rules aren’t working
- forward/redirect taxonomy archive of term to a page with same name
- Using page as front page, why does /page/### work?
- corrupted URLs – can’t leave starting page
- WP returns to domain root instead of siteurl
- SEF add_rewrite_rule & add_rewrite_tag not working
- Rewrite WordPress Url from root to subfolder without moving files
- How to pass username in url
- Custom Post Type canonical link / pagination redirecting to root
- URL Rewrite and Archive Template Files – Post Type vs. Taxonomy
- Rewrite CPT permalinks to subdomains
- Need help adding rewrite rules to page
- Rewrite rule is catching pages not posts
- How to change blog category, author URL in wordpress
- URL Variables in a Certain Page
- Two Rewrite Rules
- Use add_rewrite_rule to change subpage url
- How to add unique auto-increment number on url before slug
- Need help with regex
- Rewrite Page Parameters
- How to make such a structure for cpt?