Jump to content

Redirection not is consistent


langenf

Recommended Posts

 

hi,

im making an app that needs users to be logged in inorder to use it.

The file structure of the app is like this.

root

/app

//includes

includes is in tha app folder which is in the root.

includes folder has a file that login_check and moves the redirects the to app/index.php when the user is

not logged in like this header("Location:../index.php?mesagge=$mesagge"). It works as expected within

the application. Say for example when the user clicks the logout button or when user enters a wrong password trying to login

. But when i try to access a file in the app folder say app/show_articles.php without logging in, it redirects the user to

root folder  index.php. Can you please say what is wrong here?

Link to comment
Share on other sites

it could be the path is no longer correct from their current location as you using a relative path.

I dont want to use absolute path since relative paths are usually better. If it cannot be done with

relative path, im willing to use absolute paths though

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.