-Buradaki Kodlar Bir Çok Hosting'te Çalışmaktadır, Ancak Çalışmadığı Hostinglerde Bulunmaktadır..
Özellikle Ücretsiz Hostinglerde Sorun Çıkma Olasılığı Yüksektir..
Gerekmesi Durumunda Kodları Bölüm Bölüm Ekleyerek Sitenizde Çalışan Kodları .htaccess İçerisine Ekleyebilirsiniz..
Tüm .htaccess İçeriğini Silerek Bu Kodları Eklemeniz Durumunda, Sorunsuz Çalışacaktır..
Ancak Değişiklik Öncesi Yedek ALMANIZ ÖNERİLMEKTEDİR !
#---------------------- KOD BASLANGICI --------------------------
############################################-
WORDPRESS GUVENLIK AYARLARI - HTACCESS-
############################################-
# WP STANDART HTACCESS + SQL INJECT KORUMASI-
<IfModule mod_rewrite.c>-
RewriteEngine On-
RewriteBase /-
### SQL Injection Protection-
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]-
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]-
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})-
RewriteRule ^(.*)$ index.php [F,L]-
RewriteRule ^index\.php$ - [L]-
RewriteCond %{REQUEST_FILENAME} !-f-
RewriteCond %{REQUEST_FILENAME} !-d-
RewriteRule . /index.php [L]-
</IfModule>-
############################################-
# DISTAN WP CONFIG ERISIMINI KAPATMAK-
<files wp-config.php>-
order allow,deny-
deny from all-
</files>-
############################################-
# DISTAN HTACCESS ERISIMINI KAPATMAK-
<Files ~ "^.*\.([Hh][Tt][Aa])">-
order allow,deny-
deny from all-
satisfy all-
</Files>-
<files .htaccess>-
order allow,deny-
deny from all-
</files>-
############################################-
# WP-INCLUDES GUVENLIGI-
<IfModule mod_rewrite.c>-
RewriteEngine On-
RewriteBase /-
RewriteRule ^wp-admin/includes/ - [F,L]-
RewriteRule !^wp-includes/ - [S=3]-
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]-
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]-
RewriteRule ^wp-includes/theme-compat/ - [F,L]-
</IfModule>-
############################################-
# KLASOR INDEXLEMEYI ENGELLEME-
<IfModule mod_autoindex.c>-
Options -Indexes-
</IfModule>-
############################################-
# WP GIZLI KLASOR VE DOSYALARA ERISIMI ENGELLEMEK-
<IfModule mod_rewrite.c>-
RewriteCond %{SCRIPT_FILENAME} -d [OR]-
RewriteCond %{SCRIPT_FILENAME} -f-
RewriteRule "(^|/)\." - [F]-
</IfModule>-
############################################-
# WP KAYNAK DOSYALARINA ERISIMI ENGELLEMEK-
<FilesMatch "(^#.*#|\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|sw[op])|~)$">-
Order allow,deny-
Deny from all-
Satisfy All-
</FilesMatch>-
############################################-
# WP DOSYA ONBELLEKLEME - HIZLANDIRMA -
<ifModule mod_expires.c> -
ExpiresActive On -
ExpiresDefault "access plus 5 seconds" -
ExpiresByType image/x-icon "access plus 2592000 seconds" -
ExpiresByType image/jpeg "access plus 2592000 seconds" -
ExpiresByType image/png "access plus 2592000 seconds" -
ExpiresByType image/gif "access plus 2592000 seconds" -
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" -
ExpiresByType text/css "access plus 604800 seconds" -
ExpiresByType text/javascript "access plus 216000 seconds" -
ExpiresByType application/javascript "access plus 216000 seconds" -
ExpiresByType application/x-javascript "access plus 216000 seconds" -
ExpiresByType text/html "access plus 600 seconds" -
ExpiresByType application/xhtml+xml "access plus 600 seconds" -
</ifModule> -
<ifModule mod_headers.c> -
<filesMatch "\.(ico|jpe?g|png|gif|swf)$"> -
Header set Cache-Control "public" -
</filesMatch> -
<filesMatch "\.(css)$"> -
Header set Cache-Control "public" -
</filesMatch> -
<filesMatch "\.(js)$"> -
Header set Cache-Control "private" -
</filesMatch> -
<filesMatch "\.(x?html?|php)$"> -
Header set Cache-Control "private, must-revalidate" -
</filesMatch>-
</ifModule> -
<IfModule mod_deflate.c> -
AddOutputFilterByType DEFLATE text/xhtml text/html text/plain text/xml text/javascript application/x-javascript text/css -
BrowserMatch ^Mozilla/4 gzip-only-text/html -
BrowserMatch ^Mozilla/4\.0[678] no-gzip -
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html -
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary -
Header append Vary User-Agent env=!dont-vary -
</IfModule> -
AddOutputFilterByType DEFLATE text/html -
AddOutputFilterByType DEFLATE text/plain -
AddOutputFilterByType DEFLATE text/xml -
AddOutputFilterByType DEFLATE text/css -
AddOutputFilterByType DEFLATE text/javascript -
AddOutputFilterByType DEFLATE application/x-javascript -
Header unset ETag -
FileETag None -
############################################
-#---------------------- KOD BiTiSi ---------------------------




