Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^([-a-zA-Z]+)?$ state.php?site=%{HTTP_HOST}&id=$1 [NC,L]
RewriteRule ^state/([-a-zA-Z]+)/([0-9]+)/?$ county.php?site=%{HTTP_HOST}&statename=$1&id=$2 [NC,L]
RewriteRule ^county/([-a-zA-Z]+)/([-a-zA-Z]+)/([0-9]+)/?$ city.php?site=%{HTTP_HOST}&statename=$1&countyname=$2&id=$3 [NC,L]
RewriteRule ^city/([-a-zA-Z]+)/([-a-zA-Z]+)/([-a-zA-Z]+)/([0-9]+)/([0-9]+)/?$ information.php?site=%{HTTP_HOST}&statename=$1&countyname=$2&cityname=$3&id=$4&countyid=$5 [NC,L]
<snip> it is SUPER slow when it hits the first sub-domain, then it gets faster as you get deeper into the site - and www. subdomain is wicked fast. You guys see anything that can make this go as slow as it is?
Thanks a TON!
[edited by: jdMorgan at 10:31 pm (utc) on Oct. 8, 2009]
[edit reason] Please see Terms of Service. [/edit]
I don't see any potential 'infinite loops' or ambiguous patterns here, which is the usual cause of slowness. The only suggestions I can come up with right now are:
1) Examine the client-server HTTP transactions with the "Live HTTP Headers" add-on for Firefox (or similar), to see if you got any external redirect looping going on.
2) Temporarily replace each script filepath in your rules (one at a time) with a filepath that points to a small HTML page. The see if that small static page is fast or slow. This would help differentiate a mod_rewrite execution slow-down from a script-execution slowdown.
3) Try disabling all but one of your rules and work on one at a time. Simplify. Divide and conquer.
Jim