http://www.perlmonks.org?node_id=857340


in reply to Changing http headers in cgi response

With Apache and mod_rewrite you can designate a particular page or script to be served whenever some other page isn't found. This decision gets made before the 404 error handler ever gets invoked. Don't return a 404 then return the proper content. 404 is an error. Leave it an error.
  • Comment on Re: Changing http headers in cgi response

Replies are listed 'Best First'.
Re^2: Changing http headers in cgi response
by twotone (Beadle) on Sep 10, 2010 at 05:20 UTC

    I'm not experienced at all with apache or mod_rewrite. Can you provide me an example of how to do that?

      I would, but Your Mother already gave a good example in Re^3: Changing http headers in cgi response. There's no better advice I could give than to start there and to take specific questions about Apache and mod_rewrite to a forum where those are on topic (or the Chatterbox here if they are short and simple questions, since that's not really topic-limited).