I would like to produce a 404 error intentionally for some pages on my server, and I am currently working on the headers. The problem is, for the scripts that exists (and I give a 404 error in the script), the Content-Type
header field shows text/html; charset=UTF-8
, while for the real 404 pages the same field shows text/html; charset=iso-8859-1
, which defeats my purpose. I've tried adding AddDefaultCharset UTF-8
to the main config but there's no luck. The question is, how to set the charset on these real error pages?
Home
/
user-355980
lkp111138's questions
Let's say I have a directory I want to restrict access that way, so that users can access the directory only on like 6am to 6pm. I know how to do this by using PHP (using time()%86400
). But can I do it entirely using Apache's builtin functions (.htaccess or server apache2.conf) or other mods?
Recently there are some clients issuing CONNECT requests or treating my server as a proxy server, which really annoys me. The current method I am using is to check access.log regularly to filter out such requests and hacking attempts (trying to access /PMA/, etc) The question is, how can I automate this process, such that the server blocks these IP addresses when such requests are detected?