Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 54525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:14:01+00:00 2026-05-10T17:14:01+00:00

I have a website which uses the custom 404 error handling in PHP/Apache to

  • 0

I have a website which uses the custom 404 error handling in PHP/Apache to display specific pages.
e.g. http://metachat.org/recent

I’ve a feeling this is a bad way of doing this, but it’s code I inherited…

Although the page displays correctly on most browsers, I’m getting a situation where AVG Anti-Virus is hijacking the page and redirecting it to an offsite 404 page.

I’ve tried to force a header (Status: 200 OK) using the header command in PHP, but if I do a curl -I of the page, I get the following…

HTTP/1.1 404 Not Found Date: Fri, 03 Oct 2008 11:43:01 GMT Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.1.4 PHP/4.3.10-16 mod_ssl/2 .0.54 OpenSSL/0.9.7e X-Powered-By: PHP/4.3.10-16 Status: 200 OK Content-Type: text/html 

I guess that first line is the line AVG traps for its forced redirect. Without rewriting the software to use Mod_rewrite (which I don’t really understand), how can I (in PHP) stop the ‘HTTP:/1/1 404 Not Found’ line being sent in the headers when displaying this page?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:14:02+00:00Added an answer on May 10, 2026 at 5:14 pm

    There’s no way other than using URL rewriting (mod_rewrite) or creating the missing pages. What’s happening is that the client requests a page which doesn’t exist. Apache is configured to serve a special page upon 404 errors, but it still sends the 404 status code, then AVG traps that.

    So, you could do something like:

    RewriteEngine On RewriteCond %{REQUEST_URI} !-f RewriteCond %{REQUEST_URI} !-d RewriteRule (.*) index.php?missing_content=$1 

    That will rewrite everything that doesn’t exist (and would thus give a 404) to your index.php with the URL path in the missing_content query string parameter

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 57k
  • Answers 57k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer On newer Bash Versions you could simply add a space… May 11, 2026 at 8:29 am
  • added an answer You may want to investigate preg_match_all. If I recall correctly,… May 11, 2026 at 8:29 am
  • added an answer Turns out I had overlooked the camel casing for the… May 11, 2026 at 8:29 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Related Questions

Loading...

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.