Forum Moderators: phranque

Message Too Old, No Replies

Things are being rewritten that shouldn't be.

         

jake66

8:45 am on Mar 27, 2008 (gmt 0)

10+ Year Member



For the record:
/category & /product don't exist. They're used for my rewrites, that's it.

My htaccess:

RewriteRule ^category/([^.]+)\.html$ index.php?category=$1&%{QUERY_STRING} [NC,L]
RewriteRule ^product/([^.]+)\.html$ productpage.php?product_id=$1&%{QUERY_STRING} [NC,L]

I have a thumbnail script (that should not be rewritten), that is presently experiencing some difficulties.

It is linked as follows:

$image = '<img src="/thumb.php?image=' . $src . '&w=' .tep_output_string($width) . '&h=' . tep_output_string($height) . '"';

It is being rewritten as either /category/thumb.php OR /product/thumb.php (depending what page you're looking at).
I've tried removing/replacing the / in /thumb.php to no avail.

As well, my full-size images (that are NOT affected by the thumbnail script) are being rewritten as:
/catagory/image/image_name.gif OR /product/image/image_name.gif (depending what page you're looking at)

Those are linked as:


<img src="/images/image_name.gif">

As well, I removed/added the / in /images... no luck.

I've sent Xenu linksleuth to my site and it too, is finding these peculiar rewrites.

I've tried time and time again to replicate this on as many browsers as I can get my hands on, I cannot. Anytime I view my pages they show up perfectly.
As well, Google's cache of my site links everything accordingly.

Not EVERY visitor experiences this, but I see it about 10 times a day for every 1,000 visitors.. which is a lot based upon my daily traffic for this site.

Any tips as to what could be causing this?

jdMorgan

4:01 pm on Mar 27, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your links are server-relative, and the RewriteRules are unconditional and the patterns quite specific. In addition, the problem is intermittent. This points to a scripting error, rather than a problem with mod_rewrite and/or Apache.

Jim

jake66

2:04 am on Mar 29, 2008 (gmt 0)

10+ Year Member



Hi jdMorgan,

Initially I thought this was a scripting error too, but I just spotted somebody viewing one of my header images, which are not re-written and are not connected to any script.

It is linked as follows:

<td style="background-image: url(/images/header.gif)" WIDTH=800 HEIGHT=76">

but they seen:

<td style="background-image: url(/category/images/header.gif)" WIDTH=800 HEIGHT=76">