Protecting Pages Code? What am I doing wrong. Please help

4 replies
Hi there,

I am having an issue protecting sub-folders within sub-folders with PHP.

I have been protecting pages with only short directories (doing fine), but now I am wanting to protect new directories with a number of sub-directories and that is where I am having troubles.

PHP Login Script Location:

Works Fine -
Pages Protected:

Does not work -
Wanting Pages Protected:
(and branched out from there)

This is the code I use on tops of all my pages, but the long one's do not work...

PHP Code:
$session->logged_in){ header("Location: ..../main.php"); } else { 
<!-- -->
Only "../" works, not "..../" or "....../".

Can anyone tell me why this is the case and what I am doing wrong.

#code #login #pages #php script #protecting #wrong

Trending Topics