user2537383
user2537383

Reputation: 315

Restrict access to PHP files in /lib but allow other files to call them (lighttpd)

I am trying to restrict direct access to all php files in the /lib directory, but allow other php scripts in the web server access them (ie AJAX calls). The following restricts access correctly, but prevents other php files from calling them as well:

$HTTP["url"] =~ "^/lib" {
    url.access-deny = (".php")
}

Is there a way to ONLY prevent direct access??

Upvotes: 1

Views: 390

Answers (1)

Bioto
Bioto

Reputation: 1117

If you can set the permissions of "lib" to 555 i believe it should block it from the outside world.

Upvotes: 0

Related Questions