Forum Moderators: coopster
I'm using PHP with apache,
I want get the incorrect link that people go to my site, but I don't know how to do
example: my correct link is http://example.com/help/php/
but one person type http://example.com/help/php4/ and that link does not exist on my site. But I still want to get that incorrect link for my purpose.
Anyone can help me?
thanks you!
[edited by: jatar_k at 3:19 am (utc) on June 28, 2007]
[edit reason] please use example.com [/edit]
but one person type http://example.com/help/php4/ and that link does not exist on my site. But I still want to get that incorrect link for my purpose.
Then create a custom 404 page.
I think Haian is trying to save the last invalid URL while it is handled by 404 page. If that is what you are looking for, this can get you the last URL :
$last_invalid_url = getenv('HTTP_REFERER');
You can email it from here, or save into a database, but $last_invalid_url will contain the last accessed invalid page.
Habtom
[edited by: Habtom at 7:52 am (utc) on June 28, 2007]
i did it .
in file HTTP_NOT_FOUND.html.var, I insert this code
<script>
location.href="http://example.com/load/index.php?url=http://example.com<!--#echo var="REQUEST_URI" -->";
</script>
Then it will return that url to the page I want get url
[edited by: dreamcatcher at 8:36 am (utc) on July 4, 2007]
[edit reason] Please use example.com [/edit]