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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:27:14+00:00 2026-05-29T19:27:14+00:00

I am trying to create a login page for some sites that I manage.

  • 0

I am trying to create a login page for some sites that I manage. So far it worked easy enough by having a login page which connects to a database which told the page where to redirect them.

I also have an .htaccess that rewrites the URL to pass through an authorisation page that just checks if a session has been started then pushes them through.

The problem I have is that when an admin logs in to the admin page it isn’t parsing the php and when I go ‘view source’ I can see all the code… how do I get it to parse the php?

.htaccess

Options +FollowSymLinks  
RewriteEngine on  
RewriteRule ^(.*)$ ../authorise.php?file=$1 [NC]

authorise.php

session_name('TSiteStats');  
session_start();  
if (isset($_SESSION['user_id']))  readfile ($_SESSION['redirect'] . '/' . $_REQUEST['file']);  
else header("Location: ../login.php");
  • 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-29T19:27:18+00:00Added an answer on May 29, 2026 at 7:27 pm

    Just to be sure.

    Does you file use the <?php and ?> tags. These tag will tell Apache to load the PHP code to be executed.

    Also, does the script can be executed (has the authorization to be executed by Apache).

    Last thing, your code is using readfile which output the content of the file and not execute this one. Are you sure you want to readfile and not include it?

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

Sidebar

Related Questions

I am trying to create a login page that will send the user to
Im trying to create a iPhone Objective C login page using PHP/MySQL to authenticate.
What I'm trying to do I'm trying to create a Login which is fully
I'm trying to create a login system like http://us.battle.net/en/ . The page is fully
I'm trying to create a Login page, not worrying about actually logging in yet,
I am trying to create a custom HTML Helper that encapsulates some presentation logic
i am trying to create a login form page for codeigniter 2 within sencha
I am trying to create a login page in iphone, using sqlite . I
I am trying to create a simple login page in ASP.NET C# but am
I am trying to create a page that lets a user delete an image

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.