Easy script problem (showing current url)

Discussion in 'PHP' started by Al Capone, Mar 6, 2006.

  1. #1
    Good evening :)

    Ok, I am using Advanced Poll script and .htaccess, which is proving to be a problem, see when people vote, they are taken to the .php page instead of the rewritten page.

    Here's an example, /fight.html is actually /cool/fight.php so when people vote on /fight.html they are taken to /fight.php which doesn't even exist, I want it to take people to the current page they are on after rewrite not before rewrite. Here is the script

    So basically this script take people to the directory that the page is rewritten in (not the file where the file is), and the name of the file (not rewritten, so if origanal file was go.php and rewritten is go.html it take people to the file go.php).

    So what it does:

    Rewritten page: /go.html Non-Rewritten: /dir/go.php When you click vote you go to: /go.php

    What I want:

    When you click vote, you go to the exact page that was in the address bar before.

    Hopefully I wasn't to confusing, if I was please tell me. I am lost, and will take any help anyone will give me, thanks in advance. :)
     
    Al Capone, Mar 6, 2006 IP
  2. tccoder

    tccoder Peon

    Messages:
    69
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you copy the .htaccess?
     
    tccoder, Mar 7, 2006 IP
  3. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #3
    Could you show the code of the form itself? This sounds like it could simply be solved by changing the "action=fight.php" to "fight.html"
     
    sketch, Mar 10, 2006 IP
  4. mitchandre

    mitchandre Peon

    Messages:
    313
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You need to show us the form.
     
    mitchandre, Mar 11, 2006 IP