I wanna make a 404 error page that also shows which page is asked for but not found.
I tried with request_uri but it doesn't work.
Someone outthere who can help me with code?
hopefully,
404 error page
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Firstly this may be of interest:
http://www.devnetwork.net/forums/viewtopic.php?t=511
Secondly, have you tried:
instead of
Mac
http://www.devnetwork.net/forums/viewtopic.php?t=511
Secondly, have you tried:
Code: Select all
echo $_SERVERї'REQUEST_URI'];Code: Select all
echo $REQUEST_URI;- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Because that's what $_SERVER['REQUEST_URI'] is:
http://www.php.net/manual/en/reserved.variables.php
Mac
$_SERVER['HTTP_REFERER'] is probably more what you want:php manual wrote:'REQUEST_URI'
The URI which was given in order to access this page; for instance, '/index.html'.
All this info is available here:php manual wrote:'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
http://www.php.net/manual/en/reserved.variables.php
Mac