Yari wrote:Ahah, didn't even think of that!
As I don't want to hand-create a .php file for each new page (I'm using a CMS), I could try to find the page name based on the url... very nice.
Thanks Leatherback!
Yeah, that iswhat I am doing. However, you should facilitate for misspelling (As you are now using php to find your pages, you can avoid 404 pages all together:
As I have moved an old website to php, what I do too:
-> First check the passed URI against the URI's in the database
-> No match? Replace .php with .htm and search again
-> No match? Check for files in that folder, and serve a list if less then 10
-> Still no match? Move the header to the search page, and insert the URI with each folder / filename as a search term, and sort by match relevance.