Friday, 15 August 2014

.htaccess - Convert htaccess file to web.config to run Php on IIS 7 -



.htaccess - Convert htaccess file to web.config to run Php on IIS 7 -

i need convert .htaccess web.config in order run php on iis 7. ideas?

options +followsymlinks +symlinksifownermatch rewriteengine on rewritebase /test rewritecond %{script_filename} !-f rewritecond %{script_filename} !-d rewriterule ^(.*)$ index.php

the url rewriting module's import rules .htaccess wizard generated next rules:

class="lang-xml prettyprint-override"><?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <rewrite> <rules> <rule name="non-existent paths index.php"> <match url="^test/(.+)$" /> <conditions> <add input="{request_filename}" matchtype="isfile" negate="true" /> <add input="{request_filename}" matchtype="isdirectory" negate="true" /> </conditions> <action type="rewrite" url="test/index.php" appendquerystring="true" /> </rule> </rules> </rewrite> </system.webserver> </configuration>

the request /test/ cause iis fire /test/index.php (.*) unnecessary , (.+) more appropriate.

.htaccess iis iis-7 web-config url-rewrite-module

No comments:

Post a Comment