Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

referring page in custom 404

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  how to stop the password tries in the .htaccess p..  
Author Message
news65

External


Since: Nov 16, 2003
Posts: 1



(Msg. 1) Posted: Sun Nov 16, 2003 2:54 pm
Post subject: referring page in custom 404
Archived from groups: alt>apache>configuration (more info?)

As part of my 404, I want to offer a link back to the referring page.
Doing this makes no sense if there wasn't one.

Currently, I have:

<!--#if expr="$HTTP_REFERRER = '(none)'" -->
You appear to have typed this URL directly.</P>
<!--#else -->
Or maybe you'd like the <a href="<!--#echo var="HTTP_REFERER"
-->">referring page</a>?</P>
<!--#endif -->


This doesn't work, I always get the referring page text.

Any ideas?

 >> Stay informed about: referring page in custom 404 
Back to top
Login to vote
kd6lvw

External


Since: Nov 02, 2003
Posts: 31



(Msg. 2) Posted: Mon Nov 17, 2003 5:06 am
Post subject: Re: referring page in custom 404 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 16 Nov 2003, kirun wrote:
 > As part of my 404, I want to offer a link back to the referring page.
 > Doing this makes no sense if there wasn't one.
 >
 > Currently, I have:
 >
 > <!--#if expr="$HTTP_REFERRER = '(none)'" -->
^
Misspelled (you spelled it correctly, but it's supposed to be misspelled).
There's also the matter of what you're comparing to: "(none)" is produced only
when an empty variable is printed.

I looked at my own script and noted that one only need test to see if there's
ANY value set - i.e.:

<!--#if expr="$HTTP_REFERER" -->

was sufficient....

 > You appear to have typed this URL directly.</P>
 > <!--#else -->
 > Or maybe you'd like the <a href="<!--#echo var="HTTP_REFERER"
 > -->">referring page</a>?</P>
 > <!--#endif -->
 >
 > This doesn't work, I always get the referring page text.
 >
 > Any ideas?<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: referring page in custom 404 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
404 re-direct instead of generic page or custom page - Strange question. I know within the configuration of Apache (2.X) that I can have a custom 404 page. I would rather re-direct the request to a known good page that is not on my server at all (i.e. www.google.com). The questions is; will this..

Custom Error Pages - Hi all Trying to create custom error pages, pages are displayed when errors occur but images are not displayed In my cfg file I have ErrorDocument 403 /error/403.htm ErrorDocument 404 /error/404.htm I have an error folder in the root of each vhost..

Custom error CODES - Hi there, following situation: We use custom error codes like "852" to report special errors in a Java web application. We use Apache 1.3 together with the Websphere Application Server 4 from IBM which handles all the requests for dynamic con...

505 error page - Hi All Don't know if this can be done, I have a shared hosting with an ISP and I want to restructure my directories on the server. I have various domains pointing to my site which point to sub directories, and most search engines have listed the sites.....

404 Error Page (PHP) - In httpd.conf, I put in this line. ErrorDocument 404 /404.html Now, when I go to www.myweb.com/123, I see the 404.html. But when I enter this line into the httpd.conf. ErrorDocument 404 /404.php And enter www.myweb.com/123, I get "The page canno...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]