[geeks] WWW help

Bryan Fullerton fehwalker at gmail.com
Sat Jun 15 08:23:30 CDT 2013


On Sat, Jun 15, 2013 at 1:54 AM, Shannon <shannon at widomaker.com> wrote:

>
> # BEGIN WordPress
> <IfModule mod_rewrite.c>
>         RewriteEngine On
>         RewriteBase /derailedpress/
>         RewriteRule ^index\.php$ - [L]
>         RewriteCond %{REQUEST_FILENAME} !-f
>         RewriteCond %{REQUEST_FILENAME} !-d
>         RewriteRule . /derailedpress/index.php [L]
> #</IfModule>
>
> Is there not some other way to do that to avoid the redirect? Its extra
> load
> time, about 100-300ms with the browsers and performance tools I've used
> today.
> Also it seems for reasons I don't get, some browsers like to pause when
> hitting things like 301s.
>

That shouldn't be doing a 301 (or 302), it should be doing an internal
write and returning content from the alternate path. If there's a redirect
it's probably from some other part of the config. A useful tool for
troubleshooting rewrites is to enable the RewriteLog and set
RewriteLogLevel to 3 or 4 (I usually use 3). It will log a ton, so remember
to turn it off, but it'll let you see what mod_rewrite is actually doing
and where, including the main config and .htaccess files.

The rule itself also shouldn't be adding any noticeable performance impact,
but using .htaccess files will can because once enabled it must scan every
folder and subfolder where enabled for .htaccess files on every request. If
you have a lot of files/folders and/or not enough memory to have filesystem
cache in memory this can slow things down. It's usually preferable when
possible to add things like like this to a <Directory> directive in the
main config files.

Thanks,
Bryan


More information about the geeks mailing list