Scripting is an area I have never been comfortable in. I can work with existing code without any problems, but writing my own has always been a challenge for me.
Here’s what I came up with:
<form action="http://subdomain.example.com/" method="post" name="redirect"> <input type="text" value="" name="url" id="" /> <input type="submit" value="Submit" name="submit" onclick="this.form.action=document.redirect.action + document.redirect.url.value;" /> </form>
To use this, simply change the URL set in the form action to your own URL. Obviously, there’s no validation whatsoever. If a user enters a value that doesn’t pair up with a URL that resolves, it won’t work.