


| category | articles | ||||
|
Adsense Adwords Article Blog CMS CSS Style Datacenter Design Graphics Flash Animation Internet Radio Messenger Programming Provider Search Engine Security Security Web SEF SEO Software Software Web |
Prevent htaccess From Hack 3 Securing directories: Remove the ability to execute scripts Heres a couple different ways I do it code: AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi This is cool, you are basically categorizing all those files that end in those extensions so that they fall under the jurisdiction of the -ExecCGI command, which also means -FollowSymLinks (and the opposite is also true, +ExecCGI also turns on +FollowSymLinks) Only allow GET and PUT request methods to your server. code: Options -ExecCGI -Indexes -All Processing All gif files to be processed through a cgi script code: Action image/gif /cgi-bin/filter.cgi Process request/file depending on the request method code: Script PUT /cgi-bin/upload.cgi Force Files to download, not be displayed in browser code: AddType application/octet-stream .avi AddType application/octet-stream .mpg Then in your HTML you could just link directly to the file.. code: <a href="/movies/mov1.avi">Download Movie1</a> And then you will get a pop-up box asking whether you want to save the file or open it. Show the source of dynamic files If you'd rather have .pl, .py, or .cgi files displayed in the browser as source rather than be executed as scripts, simply create a .htaccess file in the relevant directory with the following: code: RemoveHandler cgi-script .pl .py .cgi Dramatically Speed up your site by implementing Caching! code: # MONTH Prevent Files image/file hotlinking and bandwidth stealing code: RewriteCond %{HTTP_REFERER} !^$ ErrorDocuments code: ErrorDocument 404 /favicon.ico You can also do an external link, but don't do an external link to your site or you will cause a loop that will hurt your SEO. OTHER ARTICLES Howto create a password for a htpasswd file using PHP Safeguard your XML based messages 3 Top 7 PHP Security Blunders (1) |
||||
| © 2001 - 2008 Tatamedia Solusindo | Link Partner: akomodasi.net, indoproduk.com, satria.com, hotelsaufbali.com, gptkk.org, apexpacific.com | |||||