
Php Scripti İçin Web Config Ayarları
Herkese merhabalar bildiğimiz gibi php ile kodladığımız bir siteyi sadece Linux sunucuda değil Windows sunucuda da yayınlayabiliyoruz.
Fakat php de bulunan .htaccess dosyası IIS üzerinde değerlendirilmediği için web config dosyası yazmamız gereklidir.Filezilla yardımı ile web config dosyasını içe aktarıyoz.
Web config ayarları aşağıdaki gibidir.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Rule" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="anadizin/index.php?patch={R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> <defaultDocument> <files> <remove value="index.php" /> <add value="index.php" /> </files> </defaultDocument> </system.webServer> <system.web> <customErrors mode="Off"/> <compilation debug="true"/> </system.web> </configuration> |
.htaccess dosyası aşağıdaki gibidr.
1 2 3 4 5 |
Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_URI}!^/xyz/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?path=$1 [L,QSA] |
Keyifli okumalar 🙂
Kaynak
Leave a reply