[wp-hackers] The life and times of an HTTP request

Seth Chromick seth at thenextwave.biz
Wed Aug 13 19:51:30 GMT 2008


Thanks for the quick answer Adam, Matt. My htaccess-fu is weak!

Matt wrote:
> More specifically, it specifies `!-f` and `!-d` so that it first
> checks if the file or directory already exists, if it does it serves
> that, if it doesn't, it rewrites it to index.php.
>
> See this for more information about -f, -d and RewriteCond:
>
> http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#RewriteCond
>
> On Wed, Aug 13, 2008 at 12:19 PM, Adam Hunter <ah125i at gmail.com> wrote:
>   
>> You .httaccess file should exclude files that already exist.  It should look
>> something like this:
>>
>> <IfModule mod_rewrite.c>
>> RewriteEngine On
>> RewriteBase /
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule . /index.php [L]
>> </IfModule>
>>
>> The rewrite conditions tell the server to serve your stylesheets,
>> javascript, etc without being routed to index.php
>>
>> Adam
>>
>>
>> On Aug 13, 2008, at 3:19 PM, Seth Chromick wrote:
>>
>>     
>>> Assumption #1: If I'm using pretty permalinks, my .htaccess file is
>>> telling the server to route every HTTP request to the index.php
>>>
>>> Assumption #2: Because of #1, this includes all HTTP requests for style
>>> sheets, javascript files, images, etc.
>>>
>>> After  using Google, and Google site: search on the wp-hackers mailing
>>> list archive, I couldn't find a sufficient answer... I've leapfrogged
>>> through the WordPress source, starting at the index, working my way to
>>> parse_request() inside the WP() class, followed through send_headers(), but
>>> I'm missing the elephant in the room: How/where does WordPress retrieve and
>>> send those files back to the web browser?
>>>
>>> Thanks for answering my dumb question / Sorry for asking a dumb, most
>>> likely previously answered question :)
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>       
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>     
>
>
>
>   


More information about the wp-hackers mailing list