Hello. My domain name is working and it is working from the index.php / directory of the site. But I directed my site's pages with .html extension. It works fine as htaccess but even though I directed with rewrite, it either downloads with html extension or I encounter INVALID RESPONSE error
My rewrite operations are as follows
error_page 404 /404.html;
location / {
rewrite ^/([a-zA-Z0-9-_]+).html$ /index.php?sayfa=$1 break;
}
location /sayfa {
rewrite ^/sayfa/(.*).html$ /index.php?sayfa=sayfalar&id=$1 break;
}
location /danisman {
rewrite ^/danisman/(.*).html$ /index.php?sayfa=danisman&id=$1 break;
}
location /detay {
rewrite ^/detay/(.*).html$ /index.php?sayfa=detay&id=$1 break;
}
location /kategori {
rewrite ^/kategori/(.*).html$ /index.php?sayfa=kategori&id=$1 break;
}
location /ilan {
rewrite ^/ilan/(.).html$ /index.php?sayfa=ilan&id=$1 break;
rewrite ^/ilan-duzenle/(.).html$ /index.php?sayfa=ilanekle&islem=duzenle&id=$1 break;
}
location /habersayfa {
rewrite ^/habersayfa/(.*).html$ /index.php?sayfa=haberler&s=$1 break;
}
location /projeler {
rewrite ^/projeler/(.*).html$ /index.php?sayfa=projeler&s=$1 break;
}
location /kategorisayfa {
rewrite ^/kategorisayfa/(.)/(.).html$ /index.php?sayfa=kategori&id=$1&s=$2 break;
}
location /danismansayfa {
rewrite ^/danismansayfa/(.)/(.).html$ /index.php?sayfa=danisman&id=$1&s=$2 break;
}
location /proje {
rewrite ^/proje/(.*).html$ /index.php?sayfa=proje&id=$1 break;
}
location /haber {
rewrite ^/haber/(.*).html$ /index.php?sayfa=haber-detay&id=$1 break;
}
location /kayit {
rewrite ^/kayit/(.*).html$ /index.php?sayfa=kayit&id=$1 break;
}
location /Ara {
rewrite ^/Ara/(.)/(.)$ /index.php?sayfa=ara&id=$1&adi=$2 break;
}
location /sayfalar {
rewrite ^/sayfalar-(.*?)?$ /index.php?sayfa=sayfalar&id=$1;
}
location = /sitemap.xml {
rewrite .*$ /sitemap.php break;
}
Please help.