SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Jun 2000
    Location
    NJ
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to stick the following SSI calls along with the text you want to use in a page called 404.shtml:

    This is the requested URL:
    <!--#echo var="REQUEST_URI" -->

    This is the referring URL:
    <!--#echo var="HTTP_REFERER" -->

    That should do it. You may have to make some adjustments on the server end to ensure that it would indeed pick up a customized 404 page, and that it recognizes .shtml extensions.

    -jim

  2. #2
    SitePoint Zealot
    Join Date
    Jan 2000
    Location
    CT
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was wondering how did sitepoint.com get the error page to show where the link orriginated from and then show where it was going to.

    I know how to make an error404 page but if you type in www.sitepoint.com/nothere and look at the subject in the form, you will see that it says the page that you were trying to access. But what I find most interesting is that if you started at page www.sitepoint.com/bob (for example) and then clicked on a link that was not there ie www.sitepoint.com/not here, it would display in the subject box something like this:

    "sitepoint.com/bob --&gt; <A HREF="http://www.sitepoint.com/nothere"" TARGET=_blank>www.sitepoint.com/nothere"</A>

    Does anyone know how to do this? Matt, maybe when you get back from your trip... and good luck on that!

    Thanks

    -Steve Klebanow www.sparkgames.com

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2000
    Location
    CT
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks... I just wish my server supported SSI!

    -Steve Klebanow www.sparkgames.com

  4. #4
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do it with JavaScript, when i am on later I will post the code you need to do it.

    ------------------
    Karl Austin
    KDA Web Services
    "Everyone has a photographic memory. Some just don't have film."

  5. #5
    SitePoint Member
    Join Date
    Jun 2000
    Location
    NJ
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, the Javascript code would be something like:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    &lt;script language="JAVASCRIPT"&gt;
    &lt;!--
    document.write(document.referrer)
    //--&gt;
    &lt;/script&gt;
    [/code]

  6. #6
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can also use ASP, PHP or PERL to do the same thing. Many PERL scripts already exist to handle this sort of problem.

    ------------------
    Wayne Luke - Sitepoint Moderator/Internet Media Developer
    Digital Magician Studios - Making Magic with Web Applications
    wluke@digitalmagician.com

  7. #7
    SitePoint Zealot
    Join Date
    Jan 2000
    Location
    CT
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The javascript would work best mainly becuase I am on a unix server (no asp) and it would be the easiest to do!

    Thanks
    -Steve Klebanow www.sparkgames.com

  8. #8
    SitePoint Enthusiast
    Join Date
    Apr 2000
    Location
    Palo Alto, CA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its the way u configure apacher server. (or wharever it is).
    So, if error 404 -&gt; show this page
    error 401 -&gt; show that.
    very simple. Check apaches config. file on the bottom.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •