Forum Moderators: phranque
For example:
^folder/some_path$ http://www.example.com/folder/some_path [R,L]
What I would like to do is this on my staging server:
<!--#include virtual="/folder/some_path"-->
But this doesn't seem to work. I assume it is because the value of virtual is not an actual file. Interestingly, this doesn't generate an error in the Apache log.
Some background: I have a script on my production server that returns a result set from a database. These results can be embedded on any page. What I'm trying to do is allow people previewing content on the staging server to see what results would appear once the page is published to the production server.
Note: not an option is to put a copy of the script on the staging server that accesses the production database.
Any ideas?
Thanks,
Chris
mod_rewrite only affects incoming URL requests in the URL-to-filename translation and fixup phases of the Apache APi, and not direct file access requests to the filesystem occurring during the content-handling phase.
Instead of directly-including a file there, consider including a small PERL script that can make a request and 'go get' the necessary content, for example, using libwww-perl, lwp:simple, or lwp:trivial, etc. all of which have 'go fetch this URL' function support.
Jim