Converting .htaccess (PHP) line to web.config line (IIS) -



Converting .htaccess (PHP) line to web.config line (IIS) -

i have these lines in .htaccess file , have moved site iis environment. i'm pretty sure needs go web.config file in root i'm totally lost , tried no luck. directs .php, .htm, or .html index.php page in root can command displayed , create things modular. tack on filename in query string can direct content there. anyways heres have .htaccess:

rewritecond %{request_filename} (\.php|.htm|.html)$ rewriterule ^(.*)$ index.php?q=$1 [l,qsa]

you can import , convert mod_rewrite rules iis url rewrite rules using microsoft supported url rewrite iis manager module

web.config

<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <rewrite> <rules> <rule name="rule 1" stopprocessing="true"> <match url="^(.*)$" ignorecase="false" /> <conditions logicalgrouping="matchall"> <add input="{request_filename}" pattern="\.(php|htm|html)$" ignorecase="false" /> </conditions> <action type="rewrite" url="index.php?q={r:1}" appendquerystring="true" /> </rule> </rules> </rewrite> </system.webserver> </configuration>

.htaccess web-config rewrite iis-7.5

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -