Hi,

I have a page called func.php which has several amount of function only.

How can i block someone accessing func.php via typing URL/..../func.php ? It should kick the person out from this page? I accecc func.php with calling particular functions stored in it. I was wondering if there is a feature to check "if xx function is called the continue else, break".

Thanks

the most correct way to do it is probably through the use of a 301 .htaccess redirect.

create a file known as an .htacess file with the filename ".htaccess" using notepad (or any ascii text editor).

This file should be in the root folder of your website such as public_html. alternatively, it can reside on any folder you want to protect with other rules. you can have one .htaccess file in each folder. your folder should already have .htaccess file, if not, you can create and upload it.

In the .htaccess file append on the last line:

redirect 301 /path/to/func.php http://www.domain.com/you_are_kicked.html

I accecc func.php with calling particular functions stored in it. I was wondering if there is a feature to check "if xx function is called the continue else, break".

don't understand. how do you access the functions in func.php?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.