.htaccess

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

.htaccess

Post by user___ »

Hi guys,
I have a folder containing .php files which are called from Ajax scripts. I have put .htaccess file which bans any access to them and let only the my Host IP to have rights to call them.

I would like to ask whether this will work because Ajax is called from a client so it is supposed to have client's IP which accesses a .php file.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

Here's a strange question... have you tried it yet?
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post by user___ »

No, I have not but I will. I have asked because I had though someone had tried it beforehand and can tell me. I will reply in some time whether it works or not.

Any comments are highly appreciated.
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

AJAX requests are being called from the client, not from the server. You'll effectively block out all access to those scripts.
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post by user___ »

I totally agree.
Post Reply