URI Rewrite?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bdwise

    URI Rewrite?

    Is it possible to rewrite the URI shown in the browser "Address" bar
    using JavaScript? That way, during a <form> POST, the "Address"
    information could be captured too.

    Thanks.
  • David Dorward

    #2
    Re: URI Rewrite?

    bdwise wrote:
    [color=blue]
    > Is it possible to rewrite the URI shown in the browser "Address" bar
    > using JavaScript?[/color]

    No, the addressbar can not display anything other then the URI of the page
    loaded into the window.
    [color=blue]
    > That way, during a <form> POST, the "Address" information could be
    > captured too.[/color]

    I don't see the connection.

    You could do something like:

    window.onload = function() {
    document.getEle mentById('somei nput').value = document.locati on.href;
    }

    but you would be safer with something like:

    <input type="hidden" name="someinput " value="<?php print
    $_SERVER['PHP_SELF']; ">

    Of course, users could still change the value they submit. You could also
    look at the http referer header, but that is also easy to fake.

    --
    David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>

    Comment

    Working...