Perlaccess : Tutorials : File and Directory
Inserting the Referring Url (10.3)
by Jacob A. Wheeler
http://www.bigresources.com

The following comes in very handy when you need to redirect users to the last page they came from, perfect for custom 404 error pages.

To print out the referring url, you would use the following:

Looks like: http://www.perlaccess.com/tutorials/10/10.1.html
Code: <!--#echo var="HTTP_REFERER" -->

As an example, this is how you can incorporate the referring url into a link:

Looks like: Go Back
Code: <a href="<!--#echo var="HTTP_REFERER" -->">Go Back</a>


Page Last Modified

<< Back