/    Sign up×
Community /Pin to ProfileBookmark

Htaccess Replacement

I was curious about this after going through a frustrating time with htaccess. Another user on the board said that a “serverside script” could be written in something such as PHP which would act the same as htaccess. (Unless I read the post wrong.) I know my host supports PHP, not so sure about the other languages, but what would I need to do to set something like this up? Is it more versatile than the mod rewrite?

What I really wondered is that… with help, I was able to get my media files protected (songs, etc). But now, visitors to my site can’t right click > save as to download them. Is it possible to protect those files from hotlinking, but still allow people to right click and download them to their computers? (Yes, I like having my cake and eating it too.)

Help is always appreciated.

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@RavaszauthorMar 04.2006 — ...Does anyone even know what I'm talking about, and can give me a ballpark answer here?
Copy linkTweet thisAlerts:
@chazzyMar 04.2006 — htaccess does what it does at the server level. to try to emulate it via PHP would be foolish at best and near impossible in most cases, as you could easily find the URL for any media you provide if it's on a page.
Copy linkTweet thisAlerts:
@RavaszauthorMar 05.2006 — Uh... okay. I guess there's no solution for what I'd like to do.
×

Success!

Help @Ravasz 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...