I have thought about using WordPress – or maybe just copy a few functions to an internal site – but before I’d use it I would like to know how it’s working.
How is the .htaccess and URL rewrite combined with index.php?
- The .htaccess sends everything to index.php and I have tried to follow every file but I can’t see how index.php detects the url.
How could I build a simple version of that?
There is a very detailed summary in the WordPress Codex on Using Permalinks.
If you are interested in how it was implemented, see the WordPress Rewrite API in file
/wordpress/wp-includes/rewrite.phpand check the related reference entry in WP Codex.