I'm having a problem and I'm wondering if you can help. Here's the deal.
My site uses a template to create pages. There is a database that contains details on pages -- sectionName, URL, pageID, pageHTML (i.e. the content) and some other stuff (eg: imageURL).
What I want to do is set up some dynamic content caching.
The plan is this:
The Error404 page will:
Search for the requested page in the database, and if there is an exact match, display the file "publish-template.php?pageID=XX", where XX is the pageID of the record.
Save that generated HTML as a file in the filesystem. This means that subsequent users will not get the error.
Once that's working, I'll be able to add a feature that deletes pages when user submissions are added to them, and not have to do the manual publishing that I currently do.
I'm almost there. I can generate and save the file, but now I've got a weird problem.
It seems that, because I am adding a querystring value, my include() statement has to be an [url]http://[/url] include. This means the syntax is include("http://www.mydomain.com/publish-template.php?pageID=XX");
(I've tried other schemes, and this is the only one that works).
It generates the page OK, but seems to append ?SESSSIONID=XX onto the end of all of the URLS I am outputting as links (for the navigation).
Any clues on how I can stop this?
Thanks
Liam Cody