mod_rewrite & voting mod_rewrite & voting
 

News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

mod_rewrite & voting

Started by garry, September 21, 2006, 02:28:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

garry

Vote doesn't work when mod_rewrite engine is on. But it works if following line in ratepic.php removed:

// If referer is not displayimage.php we don't accept the vote
if (!eregi("displayimage",$_SERVER["HTTP_REFERER"])){
    header('Location: displayimage.php?pos=' . (- $pic));
    exit;
}


Question: what is this line for?

Nibbler

If referer is not displayimage.php we don't accept the vote.

This should not be an issue, since the referrer should still contain displayimage even when using the SEF urls plugin. Have you made any modifcations to the plugin? Do you have your client set to supress the http referer? Can you var_dump() what the referer is for you when the plugin is enabled?

garry

Sorry, it's my mistake. I've set in SEF plugin urls like "displayimage.php?pos-123" rewrite to "image-123.html"...