I’m trying to block viewing a javascript page (.js) if user is not logged in,
i wanna do it from the index.php page to write a 404 or 403 header, how is it done ?
note: i dont wanna use chmod since it globally change the file permissions and not for the visitor
header("HTTP/1.0 404 Not Found", "js.js");
js.js is a false parameter, just a sample of how i want it or something does a similar thing,
You will need a seperate script for this.
Such as
file.php
to use it
and put your files in a non web accessible location