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
Post a Comment