Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grabbing the url of a url rewrite 1

Status
Not open for further replies.

tyutghf

Technical User
Apr 12, 2008
258
GB
My website runs behind a series of rewrites so

/article.asp?article=hello-bob becomes

/article/hello-bob/

I have a form on each page, submitting the form takes them away temporarily with the aim of bringing them back after everything is complete. On the form I have a hidden field grabbing the url of the page they were on before submitting the form.

This works perfectly on pages that aren`t url rewritten. On an url rewrite page (i.e. the example above) server variables (URL, SCRIPT_NAME etc) all bring back the page they are on as

<input type='hidden' name='wherefrom' value='/article.asp' />

is there a way to make server variables to grab the url rewriten url instead?
I tried to use the REFERER server variable on the form page but that has the same issue (and others of not always showing the referer sporadically).

Thanks
 
concatenate server variables SCRIPT_NAME and QUERY_STRING?

QUERY_STRING: "Returns the query information stored in the string following the question mark (?) in the HTTP request
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top