I got a page which is URLRewrited by the .htaccess which runs a MySQL query twice eventhough I place it once, no loops no nothing.
.htaccess
RewriteRule ^go/([a-zA-Z0-9-_]+)$ /go.php?id=$1&%{QUERY_STRING}
RewriteRule ^go/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)$ /$2.php?id=$1%{QUERY_STRING}
go.php
<?php
$update = mysql_query('UPDATE table SET page_views=page_views+1 WHERE id =123');
?>
Every time i refresh the page it adds 2 page views to the database, why is this?
Is whatever generates the RSS feed calling that function too?
I had a similar problem with WordPress plugin dev before. Firefox does some sort of prefetch of the RSS, that causes 2 requests somehow..
Edit: The above didn’t work. Do you have xdebug enabled? Use xdebug_get_function_stack to see what paths are followed to get to your query.