Hello again – need help with something else now =-)
I have a site, so the homepage is ww.homepage.com (for example) and if a viewer comes to the site with this address ww.homepage.com/0789 then it stays on the home page but php reads the end number. I don’t want it to go to a 404 page, i want it to stay on the home page even though there is no 0789 page on my server.
Can this be done and does anyone know of a tutorial that explains it – I tried searching on google but don’t really know what to search for…
*I removed a ‘w’ on the addresses of the made up links so they are not clickable
Basically what that does is check to see if the given file or directory exists, and if it doesn’t, load index.php.
Warning: Make sure you do use 404 error headers if someone lands on a page that doesnt’ exist. Otherwise Google will think your entire website is thousands of pages that are exactly the same. (which, btw is spam.)
Oh, i don’t want to get in trouble with Google -I’ll try and explain it a bit better.
So I’m making a Daily Joke Site.
So the homepage shows today’s joke.
But if someone wants to see yesterdays joke for example they can put the date after the web address.
So, http://www.thedailyjoke.co.uk – THis will display todays joke and its the homepage.
but, http://www.thedailyjoke.co.uk/19-11-2009 – This will display the joke from the 19th november 2009 – But there is not a page on my server with this name, i want the homepage to take this date and search a database for the correct joke (this is still on the homepage).
I’m fine with most of it, i just don’t know how to get the homepage to take the extension url bit and store it as a variable and not try to find that page and redirect to a 404 page.
Hope this was a better explanation for you to help me.