Frank Z wrote:
is there a way via RewriteRule to force all access to a certain URL to return with a HTTP 500It is certainly possible with mod_rewrite, but why don't you just create a little cgi script which returns whatever you want ?e.g. i have a number 3 applications that are or will be obsoleted and is expected to return a 500 to all callers who try to access it. so when someone tries to access a deprecated URL such as http://myserver/myApp1 I would like to send back a 500 and preferably some textual information (nice to have). Will it be possible to do this via mod_rewrite?
Or just set an Alias ? Alias /my/former/page "/var/www/docs/special/my-error-page.html"Otherwise, a 500 is a "server error", which is probably not appropriate here. You should look for a more appropriate error code, maybe in the 300 series ? See RFC 2616. According to the HTTP specs, not all error codes admit a response body. Also a tip : if you return an error page, make sure it is larger than 1024 bytes or so, otherwise Internet Explorer will substitute it with a "friendly error page" which doesn't say anything helpful.
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx