Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Redirect if referer is not X using URL



Site URL: https://www.civicchangemakers.com/codecivic

Hello All:

I want to lock down a page on my site so that it can not be accessed by typing in the direct url. I only want a person to be able to access this specific page if they are coming from a consent page.

This project site (for a virtual hack-a-thon) is for middle and high-school students.  Before they can access the "get-started page" which will have a sign-up form, they will need to first go to the parental consent page (a form) have their parents complete it and then after the consent form is completed, be able to go to the "get started" page. So what I am trying to do is make it so that if a student attempts to gain access to the "get started" page by typing in the url directly they would be redirected to an access denied page.

The project site is https://www.civicchangemakers.com/codecivic

The access denied page is https://www.civicchangemakers.com/codecivic/access-denied

After some research I believe some of the code I am interested in would be utilizing document.referrer in the script, but I do not know where to start.  Also I am not sure if the code should be placed in the site code injection or page code injection.

Any assistance/code would greatly appreciated.






Link to post
  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Days

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...