Mod-rewrite question issue all do read this !

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mod-rewrite question issue all do read this !

    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:

    Originally posted by just_m3. View Post
    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 ?
    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 !

    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
    Last edited by just_m3.; 09.02.14, 11:07.
    This is ten percent luck, twenty percent skill
    Fifteen percent concentrated power of will
    Five percent pleasure, fifty percent pain

    And a hundred percent reason to remember the name!
Working...
X