Advertisement
Guest User

ht

a guest
Apr 30th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. # protect the htaccess file
  2. <files .htaccess>
  3. order allow,deny
  4. deny from all
  5. </files>
  6.  
  7. # disable the server signature
  8. ServerSignature Off
  9.  
  10. # limit file uploads to 10mb
  11. LimitRequestBody 10240000
  12.  
  13. # protect wpconfig.php
  14. <files wp-config.php>
  15. order allow,deny
  16. deny from all
  17. </files>
  18.  
  19. #who has access who doesnt
  20. order allow,deny
  21. #deny from 000.000.000.000
  22. allow from all
  23.  
  24. #custom error docs
  25. ErrorDocument 404 /notfound.php
  26. ErrorDocument 403 /forbidden.php
  27. ErrorDocument 500 /error.php
  28.  
  29. # disable directory browsing
  30. Options All -Indexes
  31.  
  32.  
  33.  
  34. #block referring domains
  35. RewriteEngine on
  36. RewriteCond %{HTTP_REFERER} digg\.com [NC]
  37. RewriteRule .*  [F]
  38.  
  39. #disable hotlinking of images with forbidden or custom image option
  40. RewriteEngine on
  41. RewriteCond %{HTTP_REFERER} !^$
  42. RewriteCond %{HTTP_REFERER} !^http://(www\.)?skysoftbackup.com/.*$ [NC]
  43. #RewriteRule \.(gif|jpg)$  [F]
  44. #RewriteRule \.(gif|jpg)$ http://www.yourdomain.com/stealingisbad.gif [R,L]
  45.  
  46. # php compression  use with caution
  47. <ifmodule mod_php4.c>
  48. php_value zlib.output_compression 16386
  49. </ifmodule>
  50.  
  51. # set the canonical url
  52. RewriteEngine On
  53. RewriteCond %{HTTP_HOST} ^skysoftinc\.com$ [NC]
  54. RewriteRule ^(.*)$ http://www.skysoftbackup.com/$1 [R=301,L]
  55.  
  56. # protect from spam comments
  57. RewriteEngine On
  58. RewriteCond %{REQUEST_METHOD} POST
  59. RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
  60. RewriteCond %{HTTP_REFERER} !.*skysoftbackup.com.* [OR]
  61. RewriteCond %{HTTP_USER_AGENT} ^$
  62. RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
  63. # BEGIN WordPress
  64. <IfModule mod_rewrite.c>
  65. RewriteEngine On
  66. RewriteBase /
  67. RewriteRule ^index\.php$ - [L]
  68. RewriteCond %{REQUEST_FILENAME} !-f
  69. RewriteCond %{REQUEST_FILENAME} !-d
  70. RewriteRule . /index.php [L]
  71. </IfModule>
  72.  
  73. # END WordPress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement