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

  • Home
  • SEARCH
  • 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 3313098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:04:31+00:00 2026-05-17T22:04:31+00:00

Simple problem: I have conditions in php like so: if (!$authorized) show_site_404(); or like

  • 0

Simple problem:

I have conditions in php like so:

if (!$authorized)
   show_site_404();

or like so for that matter

if (!$logged_on)
    show_login_page();

These are obviously toll gates so that we don’t have trespassers into parts of the system where only a specific user or only those that are logged on should be able to go.

The code in both these cases simply loads another page than that which was intended by

require( MAINPATH . 'site-404.php' );
exit();

With Apache, this was never a problem. No settings needed.

With Nginx, it sends all such calls to the frontpage. It’s like it doesn’t accept an internal “re-direct” if you see what I mean.

Any help appreciated.

  • 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-05-17T22:04:32+00:00Added an answer on May 17, 2026 at 10:04 pm

    The problem with require as this would stop your script with an error message although with errors turned off you probably wouldn’t notice this as you run an exit(); to stop execution anyway.

    Check the constant variable is including the files, try them in the same directory without mainpath constant.

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

Sidebar

Related Questions

I am having a very strange problem in a simple program and have been
I have simple problem as I am not much familiar with Java GUI. I
I have a simple problem, and one I feel should be almost trivial. I
I'm a newbie with WPF and c# and have a (probably very simple) problem.
This may seem like a simple problem to solve, but I'm new to Android
I have a Java program that continually listens for messages of a certain format
I have a simple thread pool written in pthreads implemented using a pool of
I have the following code that simply loops looking for a condition and places
I have a form that calls a custom child form. The child form is
I am currently learning MyHDL for my summer project. I have a problem grasping

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.