404 with append referer, how?

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
b
-


Joined: 07 Dec 2004
Posts: 6
Location: Germany

PostPosted: Fri Aug 14, 2009 10:40 am    Post subject: 404 with append referer, how? Reply with quote

Hello -

I like to add the wrong URL to an 404 error page link. So the user is refered to my external page indexer where the wrong URL is filtered and the most useful page will be shown.

The custom 404 page works but how to append?

How can I do this? I'm running PHP if it is needed for implementation.

I already carefully checked the forum and user help files but nothing found.


Thank you in advance.

- Henry
Back to top View user's profile Send private message Send e-mail Visit poster's website
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Mon Sep 21, 2009 2:05 am    Post subject: Reply with quote

I know this answer is coming over a month later, but I'll go for it anyways...

So you're trying to get the URL of the page that generated a 404. Well, that can be done, and the variable is held in PHP as this:
Code:
echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];


If PHP isn't installed, you could try using SSI (server-side includes). That should give you a start if this topic is still important to you.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
b
-


Joined: 07 Dec 2004
Posts: 6
Location: Germany

PostPosted: Wed Jul 07, 2010 8:10 pm    Post subject: Works! Reply with quote

Hi Stephen!

Even after several months :-)
I implemented it and it works!
Thank you very much for the explanation!

- Henry
Back to top View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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


Powered by phpBB phpBB Group