<IfModule mod_headers.c>
<FilesMatch ".(ico|gif|jpg|jpeg|png|flv|pdf|swf|mov|mp3|wmv|ppt)$">
	ExpiresDefault A2419200
	Header append Cache-Control "public"
</FilesMatch>

<FilesMatch ".(html|htm)$">
	Header set Cache-Control "max-age=1209600, must-revalidate"
</FilesMatch>

<FilesMatch ".(js|css|xml|gz)$">
	Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 1 month"
</IfModule>

<IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>

<IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    # Don't compress
    SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
    #Dealing with proxy servers
    <IfModule mod_headers.c>
    Header append Vary User-Agent
    </IfModule>
</IfModule>

<IfModule mod_rewrite.c>
	RewriteEngine on

    RewriteRule ^image.php?(.*)$ resim.php?$1 [L,QSA]
    RewriteRule ^image/([x0-9]*)/(.*)$ resim.php?size=$1&p=$2 [L,QSA]
    RewriteRule ^image/(.*)$ resim.php?p=$1 [L,QSA]

    RewriteRule ^tum-markalar$   urun.php?markalistesi=1 [L,QSA]
    RewriteRule ^tum-kategoriler$   urun.php?kategorilistesi=1 [L,QSA]
    RewriteRule ^(.*)othercss.css$   inc/ext-css.php [L,QSA]

	RewriteRule ^(.*)-k-(.*).html$ urun.php?k=$2&ref=$1 [L,QSA]
	RewriteRule ^(.*)-u-(.*).html$ urun.php?u=$2&ref=$1 [L,QSA]
	RewriteRule ^(.*)-m-(.*).html$ urun.php?m=$2&ref=$1 [L,QSA]
	RewriteRule ^(.*)-e-(.*).html$ urun.php?e=$2&ref=$1 [L,QSA]
	RewriteRule ^(.*)-t-(.*).html$ urun.php?t=$2&ref=$1 [L,QSA]
	RewriteRule ^(.*)-i-(.*).html$ icerik.php?id=$2&ref=$1 [L,QSA]
	RewriteRule ^(.*)-f-(.*).html$ inc.php?p=form&id=$2&ref=$1  [L,QSA]
	RewriteRule ^(.*)-h-(.*).html$ inc.php?p=haber&id=$2&ref=$1  [L,QSA]

	RewriteRule ^(.*)-ug-(.*).html$ urun.php?ug=$2&ref=$1 [L,QSA]

	RewriteRule ^sube/(.+)/(.+)$ inc.php?p=sube&il=$1&ilce=$2 [L,QSA]

   RewriteRule ^cikis$ ./?cikis=1 [L,QSA]
   RewriteRule ^UyeOl.aspx$ inc.php?p=uyeol [L,QSA]
   RewriteRule ^anasayfa$ index.php [L,QSA]
   RewriteRule ^davetet$ inc.php?p=uyedavet [L,QSA]
   RewriteRule ^ara-(.*),(.*)$ ara.php?q=$1&$2 [L,QSA]
   RewriteRule ^ara$ ara.php [L,QSA]
   RewriteRule ^r-(.*)$ ./?ref_id=$1 [L,QSA]
   RewriteRule ^u-(.*)$ ./?ref_id=$1 [L,QSA]
   RewriteRule ^p-(.*)$ ./?pin_id=$1 [L,QSA]

   RewriteRule ^urun-(.*)-(.*)$ urun.php?u=$1 [L,QSA]
   RewriteRule ^urun-(.*)-(.*),(.*)$ urun.php?u=$1&$3 [L,QSA]
   RewriteRule ^urun-(.*)-(.*)$ urun.php?u=$1 [L,QSA]
   RewriteRule ^urun-(.*)-(.*),(.*)$ urun.php?u=$1&$3 [L,QSA]
   RewriteRule ^urun$ urun.php [L,QSA]
   RewriteRule ^download$ icerik.php?ref=download [L,QSA]

   RewriteRule ^icerik-(.*)-(.*),(.*)$ icerik.php?id=$1&$3 [L,QSA]
   RewriteRule ^icerik-(.*)-(.*)$ icerik.php?id=$1 [L,QSA]
   RewriteRule ^kategori-(.*)-(.*),(.*)$ urun.php?k=$1&$3 [L,QSA]
   RewriteRule ^grup-(.*)-(.*),(.*)$ urun.php?ug=$1&$3 [L,QSA]

    RewriteRule ^([a-z0-9_-]+),(.*)$   inc.php?p=$1&$2 [L,QSA]
    RewriteRule ^([a-z0-9_-]+)$   inc.php?p=$1 [L,QSA]

    RewriteRule ^(.*)\.(sql)$   cache.php?file=$1.$2 [NC,L]
    RewriteRule ^(.*)\.(gz)$   cache.php?file=$1.$2 [NC,L]

	<IfModule mod_env.c>
		SetEnv SEO_SUPPORT 1
	</IfModule>
</IfModule>

ErrorDocument 404 /?p=404.php