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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:40:11+00:00 2026-05-26T07:40:11+00:00

One of the basic files in a particular package is a file that checks

  • 0

One of the basic files in a particular package is a file that checks for valid session data, and if none exists, redirects the user to the login page with an error, using header("Location:" . $var);.

This file is included in pretty much all files within the package, as it has other elements which are required (such as including either files depending on certain factors). However, a fair few of the files in which it contains are requested via AJAX.

Will the header() redirect still work and have the user redirected even though the request is made via AJAX, or will the page itself simply redirect, causing an initial AJAX request to say page1.php to turn into an AJAX request to page2.php?

Any answers would be very much 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-26T07:40:11+00:00Added an answer on May 26, 2026 at 7:40 am

    The redirect will not bubble back up – only the AJAX request will be redirected. You could contrarily return the location of the redirect as the body of the AJAX content and use that in the success function as a location.href = "<URL from AJAX call>"; call or just return a particular error response and redirect accordingly.

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

Sidebar

Related Questions

The basic problem I have here is that I have one xml file that
i have a really basic java program just one .java/.class file (.java uncompiled .class
One of the basic data structures in Python is the dictionary, which allows one
I built a basic search form that queries one column in one table of
For a particular piece of homework, I'm implementing a basic data storage system using
I have a file that goes thru a large data set and splits out
I have a bunch of files that I am moving from one wiki (Markdown
Here one more basic question asked in MS interview recently class A { public
I have a few model classes with basic one-to-many relationships. For example, a book
Very basic question - how to get one value from a generator in Python?

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.