URI Rewrite?

B

bdwise

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.
 
D

David Dorward

bdwise said:
Is it possible to rewrite the URI shown in the browser "Address" bar
using JavaScript?

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

I don't see the connection.

You could do something like:

window.onload = function() {
document.getElementById('someinput').value = document.location.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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top