Help to get a dir to be forbidden, .dem files only downloadable in it
Posted by: Rirre (---.tbcn.telia.com)
Date: January 04, 2009 02:04AM

Hi there,


I don't know if this is possible, but, i want no one to have access to view any files or directorys which exist in C:/HLServer (make everything 403 Forbidden & so the person can't step forward into a dir which exist in C:/HLServer, like www.website.com/HLServer/Im-behind-hlserver/).
It's for .dem files to be downloaded only which exist in C:/HLServer/cstrike folder.
So directorys and any other files which exist in it is impossible to be view- & downloadable.

www.website.com/ = C:/wamp/www (access to everything)
www.website.com/HLServer = C:/HLServer (only .dem files)


(No changes here, its the root, just leave it)
<Directory "C:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride None
Order Allow,deny
Allow from all
</Directory>



(Forbidden, but .dem files is (only) downloadable here, nothing else, it's here i need help).
<Directory "C:/HLServer/">
AccessFileName .dem
AllowOverride ?
Order ?,?
</Directory>



Edited 4 time(s). Last edit at 01/04/2009 02:14AM by Rirre.

Options: ReplyQuote
Re: Help to get a dir to be forbidden, .dem files only downloadable in it
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: January 04, 2009 06:10AM

yes u use apaches .htaccess.


you can block access the files and folders


make a file called " .htaccess "

put it in the folder you dont want accessed


AuthType Basic
AuthName |"For My Use only"
AuthUserFile "folder address to htpasswd file"
require valid-user




then make a file " .htpasswd " back behind the www folder so nobodt can get to it and fill it in above

in it put

username:password

you can also encrypt the password

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Help to get a dir to be forbidden, .dem files only downloadable in it
Posted by: Rirre (---.tbcn.telia.com)
Date: January 04, 2009 12:49PM

i don't want to disable it totaly, i want to allow everyone to download .dem files only.


I have put in this in my .htaccess file in C:/HLServer, how i do now?
IndexIgnore *.dll *.so *.cfg hltv* *.blob *.pid *.txt *.wad *.vdf *.WAD *.lst *.dat *.gam *.inf
IndexIgnore /..

Options: ReplyQuote
Re: Help to get a dir to be forbidden, .dem files only downloadable in it
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: January 04, 2009 01:06PM

there are ways to do it


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^[(www]\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|js|css)$ - [F]


change it to your domain and list the files you dont want downloaded,,,





but wouldnt it be a lot easier to make a download folder with only the .dem file in it. ?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 01/04/2009 01:10PM by stevenmartin99.

Options: ReplyQuote
Re: Help to get a dir to be forbidden, .dem files only downloadable in it
Posted by: Rirre (---.tbcn.telia.com)
Date: January 04, 2009 02:24PM

Ok...i don't really understand that.
I don't use www. to my website, its http:// domain.com only. I'm sorry i wrote www.website.com in my first post.
I need to make C:/HLServer to be http accessable too, so how i do that?
And what would the link be if i set http access to C:/HLServer?
http:// website.com/HLServer?


Yes, it would be much easier, but HLTV recording demos (.dem files) into C:/HLServer/cstrike/.
If any player detect any player cheating in the game so can he get HLTV to record him.
And there is a page to view the structure which have been maded by the reporter. So admins need to be able to download .dem file so he can check it.



Edited 6 time(s). Last edit at 01/04/2009 02:34PM by Rirre.

Options: ReplyQuote
Re: Help to get a dir to be forbidden, .dem files only downloadable in it
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: January 04, 2009 02:32PM

u cant make a folder behind the root folder accessible,,

u cant have c:/wamp/www acccesible and then have c:/hserver

This is not safe.
you have a link to this game and ill check?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Help to get a dir to be forbidden, .dem files only downloadable in it
Posted by: Rirre (---.tbcn.telia.com)
Date: January 04, 2009 02:36PM

Ok, i wonder how other people can do it then.
[forums.alliedmods.net]
Read from #204 postcount.


It's not a game, its a program which is included in HLDS Update Tool (Dedicated HL gameserver).
You need to download HLDS Update Tool then



Edited 4 time(s). Last edit at 01/04/2009 02:49PM by Rirre.

Options: ReplyQuote


Sorry, only registered users may post in this forum.