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 9003427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:42:39+00:00 2026-06-16T00:42:39+00:00

I just did the following in htaccess: ErrorDocument 404 http://www.website.com My first question is,

  • 0

I just did the following in htaccess:

ErrorDocument 404 http://www.website.com

My first question is, it is OK for me to do this?

If there are any SEO/etc., etc. problems with redirecting 404’s to
the homepage let me know.

Second question:

The thing is I have a one-page site and I’d like to keep it that way.

What I would like to do is have a popup div show up, as an alternative to a 404 page.

So basically 404’s get redirected to the homepage, where a popup then fades in with whatever 404 message in it.

How could I trigger the popup? The jquery code would somehow have to know that the user ended up here due to a 404. Is this even doable?

(I can manage the popup itself, but how to tell it to show up after
a 404 happens.)

  • 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. Editorial Team
    Editorial Team
    2026-06-16T00:42:39+00:00Added an answer on June 16, 2026 at 12:42 am

    You can add a query string to the URL that you’re using as the 404 page.

    .htaccess

    ErrorDocument 404 http://www.website.com?page=fourOhFour
    

    Then, check to see if the variable is set to the proper value and if it is, create a variable in javascript.

    Javascript/PHP

    <script>
      is404 = "<?php echo $_GET['page'] ?>";
      if (is404 === "fourOhFour"){
        // jQuery popup code here
      }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is yet another .htaccess question. And I already did my literature review. Would
http://www.barbato.us/2011/03/18/using-opencv2-within-qtcreator-in-windows-2/ I was following this post above on how to use opencv with Qtcreator.
I just did this question out of KN King's C Programming: A Modern Aprroach.
I was wondering if there were any simple examples that did the following *
hay all, I just did the following: a = input(give a word: ) b
I tried to use dat.GUI in the following three.js example . I just did
I just did a syntax like this mysql_real_escape_string($var = 'Hello'); print_r($var); and I got
I just did the following to to keep a different copy of my config.php
I just did the following code. I see a lot of repetitions in syntax
Hey! I am trying to get ant installed and actually already did following this

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

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.