Forum Moderators: phranque
As an example, if someone types in [someurl.com...] and that page didn't exist, they would go to [someurl.com...]
I'm not having a lot of luck in getting it to work and was hoping someone could assist.
This is the line I've added to my htaccess file
ErrorDocument 404 <!--# include virtual="http://www.url.com/beta/page.cgi?&&HTTP_REFERER&&"-->
Thanks
Instead of trying to directly place a server-side include directive in your .htaccess, could you simply specify one script without a query string..
ErrorDocument 404 /beta/page.cgi
Then, inside page.cgi, get the filename the user entered from an environment variable: either,
$ENV{'REQUEST_URI'}
or
$ENV{'HTTP_REFERER'}
(not quite sure which..)
Posting this because I recall using one of those 2 environment variables in a logger once, and remember looking in my logfile and not recognising a bunch of filenames.. misspellings, old links etc.
Hope it helps, as I say, if it doesn't seem to don't spend more than a couple of minutes on it, I might be misleading you ;-)
I suggest you add the SSI to your custom 404 page, not to your .htaccess file. .htaccess files are parsed for SSI. You will also need to name your custom 404 page with a .shtml extension, use Apache's mod_includes XBitHack directive, or use the AddType directive to tell Apache to parse your 404 page for SSI.
Jim