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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:40:49+00:00 2026-06-17T00:40:49+00:00

I understand that this question has been asked multiple times, however I need further

  • 0

I understand that this question has been asked multiple times, however I need further clarification and a straight forward answer from someone that can help me please!

On my website which I host through weebly.com, I have a simple login page with a simple HTML script that is basically used to direct traffic to a desired page once they input the correct username and password credentials for their account.

Think of it like this:

Login Page (user enters credentials)
Crew Centre (redirected to this page if they log in successfully)

The reason why I am asking for a solution here is because I have an issue with users at the moment who are just bookmarking the Crew Centre instead of going through and logging in each time via the login page. Is there a way of forcing them to log in?

Does anyone know a HTML script (I would be happy to consider java-script also) that would work to block and redirect users who don’t log in first? I’m after a script that would restrict users who don’t come from a specific page (in this case its the Login page) and as a result they get redirected to a page which I will make saying “You must login first to access this feature.

I just want to reinforce that I’m not after anything secure at all, just something that is simple, this is just for feel and experience.

If anyone requires further clarification on my question, just let me know!

Thank you everyone!

  • 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-17T00:40:50+00:00Added an answer on June 17, 2026 at 12:40 am

    I’m assuming you’re using JavaScript on the login page to check the credentials. If that’s the case, you could set a “signed in” cookie in the same JavaScript, then check for that cookie on the Crew Centre page.

    You’ll need to make the cookie go away somehow, too. Either set a short timeout or put JavaScript on the Crew Centre page to remove it.

    Here’s some example code:

    // Put this in your login function, just before the redirect
    var sessionTimeout = 1; //hours
    var loginDuration = new Date();
    loginDuration.setTime(loginDuration.getTime()+(sessionTimeout*60*60*1000));
    document.cookie = "CrewCentreSession=Valid; "+loginDuration.toGMTString()+"; path=/";
    
    
    // Put this at the top of your Crew Centre page
    if (document.cookie.indexOf("CrewCentreSession=Valid") == -1) {
      location.href = "/Login.html";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that this question has been asked loads of times, but I have
I understand this question has been asked several times. You would think at least
First, I know this question has been asked several times before and that in
I understand that this question has been asked before, but most of the time
I understand that this question has likely been asked, but I don't understand the
I know this question has been asked a few times. I understand how to
Alright, I understand that this problem has been asked a lot of times at
I know that this question has been asked million times so my apologies. I
Pardon me if this sounds a question that has been asked many times but
I fully understand this question has been asked a lot , but I'm asking

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.