Main Content RSS FeedSon Eklenen

htaccess dosyası ipuçları

.htaccess dosyası ile klasörlerde gezintiyi aktif hale getirmek.

Options +Indexes
## block a few types of files from showing
IndexIgnore *.wmv *.mp4 *.avi

.htaccess dosyası ile klasörlerde gezintiyi tamamen kapamak.

Options All -Indexes

.htaccess dosyası ile özel hata sayfalarına yönlendirmek.

ErrorDocument 403 /forbidden.html
ErrorDocument 404 /notfound.html
ErrorDocument 500 /servererror.html

.htaccess dosyası ile varsayılan giriş sayfasını değiştirmek.

DirectoryIndex myhome.htm index.htm index.php

.htaccess dosyası ile istemediğiniz kişiler, ip aralıklarını ve web sayfalarından gelen ziyaretçileri engellemek.


order deny,allow
deny from 202.54.122.33
deny from 8.70.44.53
deny from .spammers.com
allow from all

.htaccess dosyası ile sadece sunucunun bağlı olduğu ağdaki ip’leri engellemek.

order deny,allow
deny from all
allow from 192.168.0.0/24

.htaccess ile web sitenize gelen ziyaretçileri eski sayfanızdan yeni sayfanıza yönlendirmek.

Redirect eskisayfa.html http://www.domainname.com/yenisayfa.html
Redirect /eski_klasor http://www.domainname.com/yeni_klasor/

.htaccess dosyası ile .htaccess ve web sitenizdeki diğer içerik sayfalarının görüntülenmesini engellemek.


order allow,deny
deny from all

.htaccess dosyası ile Gzip ‘i aktif hale getirin.

# BEGIN GZIP

# Combine the below two lines - I've split it up for presentation
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css
application/x-javascript application/javascript

# END GZIP

Diğer Yazılar