ErdemSağlam
Hectopat
- Katılım
- 5 Nisan 2018
- Mesajlar
- 137
Daha fazla
- Cinsiyet
- Erkek
Arkadaşlar merhaba Windows serverda basit bir .htaccess dosyasını nasıl işlevsel hale getirebilirim? Plesk kullanıyorum. Nasıl yapacağım hakkında en ufak bir bilgim yok. Daha önce Windows server kullanmadım.
.htaccess dosyam:
.htaccess dosyam:
Kod:
Options -Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
#ssl yönlendirme
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^(.*)$ $1.php
RewriteRule ^blog-([0-9a-zA-Z-_]+)-([0-9]+)$ blog-detay.php?sef=$1&blogs_id=$2 [L,QSA]
#404 hata sayfası yönlendirme kodu
ErrorDocument 404 http://localhost/klinikasistan/error.php
convert edilmiş web.config dosyam
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<compilation defaultLanguage="php" />
</system.web>
</configuration>
<rule name="Imported Rule 1" stopProcessing="true">
<match url=".*" ignoreCase="false" />
<conditions>
<add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
<rule name="rule 1g">
<match url="^(.*)$" />
<action type="Rewrite" url="/{R:1}.php" />
</rule>
<rule name="rule 2g" stopProcessing="true">
<match url="^blog-([0-9a-zA-Z-_]+)-([0-9]+)$" />
<action type="Rewrite" url="/blog-detay.php?sef={R:1}&blogs_id={R:2}" appendQueryString="true" />
</rule>