Understanding How WordPress Works (Technically)
-
Hi,
I would really like to understand how WordPress works technically, which (in my case) begins with the .htaccess.
After a regular install, the .htaccess looks like this:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
I understand this as:
“If the requested URL neither points to a file not to a directory, then do the following RewriteRule.”
The RewriteRule only has a dot “.” – which I’d normally understand as a regex wildcard for ONE SINGLE CHARACTER. Basically, to me it reads “move every single character URI to /index.php”, which can’t be correct in my opinion – I know I am wrong, but I wonder why it’s not “.*” for more than one character..
I am really interested in understanding how WP works.
For example, I have permalinks set to date and name based:
/%year%/%monthnum%/%day%/%postname%/So, e.g. I type in “(mysite)/2007/06/08/example/”
How does WordPress know what post to show???
A. It is no file, so the first RewriteCond does not work
B. It is no directory, so the 2nd RewriteCond does not work, either.
C. So the RewriteRule is executed, right?What happens next?
I’d appreciate help on this greatly – thanks!
- The topic ‘Understanding How WordPress Works (Technically)’ is closed to new replies.