-
- 79 Posts
I need to create a page, well, I suppose it’s a non-page of sorts, which unsets a cookie, does a small amount of other PHP processing, and then redirects to a new URL via the Location: header. There will be no actual page output as such whatsoever.
Is there an easy way to do this in MODx? The difficulty of course is that cookie-handling and header-setting both need to be done before there is any page output whatsoever.
Alternatively, I suppose I could create the php script as an actual page in the filesystem: is there somewhere I should put such a page, and anything I would need to set up in MODx to prevent it from trying to process the URL as if it were a MODx "Friendly URL" belonging to an actual MODx page?
Thanks for any advice.
Please don't PM me unless it's absolutely essential: if a technical question is worth asking, it's worth asking in public, so that others can share their experience, and so that all can learn from the answers.