/    Sign up×
Community /Pin to ProfileBookmark

htaccess or something?

I have a page at [url]http://loado.com/inc/js.php[/url] that I include in a page like this:
<script type=”text/javascript” src=”http://www.loado.com/inc/js.php“>
I want the server to be able to read the file but I don’t want people to actually be able to go to the page and see the file. Is this possible? I have been trying with .htaccess.

to post a comment
Full-stack Developer

3 Comments(s)

Copy linkTweet thisAlerts:
@ray326Apr 27.2008 — No. If the browser can get it (and it HAS to) then anyone can get it.
Copy linkTweet thisAlerts:
@phpmikeauthorApr 28.2008 — i thought maybe if i disallowed all users via htaccess and then allowed the ip address of my server that would work. guess not.
Copy linkTweet thisAlerts:
@ray326Apr 28.2008 — Well maybe if your server is actually making a self request.
×

Success!

Help @phpmike spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...