Redirect on direct access

Hi All,

Sorry if this question is in the wrong section however I’m really struggling to find a solution to the below:

I have created a new page https://example.co.uk/test.php that I have a link to on index.php - I want to redirect people to index.php when they directly access test.php but allow the page to load correctly when the link on index.php is selected?

Thanks in advance

Why exactly do you want to do this? What meaning does this have in the context of your application? The reason the answers to those questions are important, is because the best solution to a programming problem requires taking into account all the information about the problem. The solution could range from a user login/user permission system to a run-once/sequence counter stored in a session variable, depending on what you are actually doing that requires you to control access to a page.

Sponsor our Newsletter | Privacy Policy | Terms of Service