Jump to content
Gonzalez

htaccess Security Tips

Recommended Posts

1. Prevent Access Attempts to HtaccessThis line(s) are to increase security of the file of htaccess so if any attempt to access the file, it will give an 403.dont forget to give the file chmod 644

order allow, denydeny from all

2. Deny Accessing Specific Filesto Restrict access to certain files you can use the following lines (change the name of ssteam.txt)the file will be hidden and if there would be an attempt to access it the 403 will show up.

order allow, denydeny from all

3. doing the same As .2, but now to Many Files:

Order Allow, DenyDeny from all

4. preventing users to restrict browsing with file extensions:

IndexIgnore *. wmv *. mp4 *. avi *. etc

5. PHP Extension disguise:We can replace the php extension with extension to our application we have already registered, probably "LOL", "hacking", etc.. Now with the following code, the file will still be read as a PHP file. Now with the following code, the file will still be read as a PHP file. (no need to change the original setting on the Apace))

AddType application / x-httpd-php. Hacking

6. prevent access to a Local Area Network:

 GET POST      order deny,allow order deny, allow     deny from all deny from all     allow from 192.168.1.5 From 192.168.1.5 allow     

7. Protected against DoS (Denial Of Service) Restricting upload file:this simple methode we can use to prevent Denial of Service attacks. (NOT DDoS)....Here we will limit the upload size of 10240000-B wich is equivalent to 10mbs.

LimitRequestBody 10240000

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...