Hellow to all
I Recently have runned into a issue add+1 in a php file which is accessed by mod-rewrite rulles .
The problem ?
1st . On server the file is accessed twice .
2nd. Can't find any way / method to stop it !!
I even tried to match url parts with preg match $_SERVER['REQUEST_URI'] and see if its accessed by rewrite , it didn't worked.
Issue ? two requests are sent to the server when i access the script on rewrited url , so there it goes +1 +1 ;
and on single url file.php?id=1 update table adds +1 which is normal !
ANY WAY TO FIX THIS ? AND ADD +1 ONLY ? on two requests ?
Added after 32 minutes:
take notice !
found the issue , i was including a javascript by path method not by url which was requested from the same url with id settup , so there you go 2 requests one for page 2nd for loading script ... Good to be known !
I Recently have runned into a issue add+1 in a php file which is accessed by mod-rewrite rulles .
The problem ?
1st . On server the file is accessed twice .
2nd. Can't find any way / method to stop it !!
I even tried to match url parts with preg match $_SERVER['REQUEST_URI'] and see if its accessed by rewrite , it didn't worked.
Issue ? two requests are sent to the server when i access the script on rewrited url , so there it goes +1 +1 ;
and on single url file.php?id=1 update table adds +1 which is normal !
ANY WAY TO FIX THIS ? AND ADD +1 ONLY ? on two requests ?
Added after 32 minutes:
Originally posted by just_m3.
View Post
found the issue , i was including a javascript by path method not by url which was requested from the same url with id settup , so there you go 2 requests one for page 2nd for loading script ... Good to be known !
Code:
http://domain.tld/view/24/(24)_Program_Benefiting_Some_Immigrants_Extends_Visa_Wait_for_Others javascript load request http://domain.tld/view/24/scripts/bbcode.js