Jul 26, 2008

.htaccess

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Computer Security Issues & Exploits

free web hosting

.htaccess

kvarnerexpress
hi,
i want to restrict certain files to be directly accessed in certain directories . These files are supposed to be included in other pages , but i want to restrict people just copy pasting their url's / copy shortcuts and paste them on the browser . is this possible by using .htaccess or something else ? I am on a shared hosting account of course and don't have root access . I would like to redirect the users / or simply restrict access to the file directly .

Reply

mbd5882
CPanel>Hotlink Protection>Enable

Input the addresses that the files can be viewed from. Just keep defult settings.
I think this only works on images, Yes-I think?

If you add another sub-domain, Stop it, Refresh, Start it again.
That new sub-domain is not included if you add it after you enable it.

Reply

clagnol
QUOTE
Q. How can I make a directory not list certain files?

A. You'll need to add the following to your .htaccess file:

IndexIgnore *.gif *.jpg

To disallow Directory browsing all together, add this to your .htaccess file:

Options -indexes

To show files in a slightly more beautiful fashion:

Options +Indexes
IndexOptions FancyIndexing

Taken from this site. It doesn't specify, but the first command is only hides JPGs and GIFs. You can hide any kind of file, and if you want to hide specific files, just replace the "*.gif" and "*.jpg" with the file names.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. uploading .htaccess files video tutorials - 98.85 hr back. (1)
  2. .htaccess redirect exploit - 145.32 hr back. (1)
Similar Topics

Keywords : htaccess


    Looking for htaccess

Searching Video's for htaccess
advertisement



.htaccess



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE