php - IIS Rewrite rule does not work in test enviroment -
i have php website running in iis 10 on laptop (win 10 pro).
 website makes use of rewrite rules , work locally.
 url mylaptop:8181/login nicely rewritten mylaptop:8181/index.php?url=login  
i put website on test server, runs iis 8.5 (win server 2012 r2).
 rewrite rule not work anymore. rewrites url testserver:207/login testserver:207//testserver:207/login. wrong here.  
this web.config:
<?xml version="1.0" encoding="utf-8"?> <configuration>     <system.webserver>         <rewrite>             <rules>                 <rule name="redirectuserfriendlyurl1" stopprocessing="true">                     <match url="^index\.php$" />                     <conditions>                         <add input="{request_method}" pattern="^post$" negate="true" />                         <add input="{query_string}" pattern="^url=([^=&]+)$" />                     </conditions>                     <action type="redirect" url="{c:1}" appendquerystring="false" />                 </rule>                 <rule name="rewriteuserfriendlyurl1" stopprocessing="true">                     <match url="^([^/]+)/?$" />                     <conditions>                         <add input="{request_filename}" matchtype="isfile" negate="true" />                         <add input="{request_filename}" matchtype="isdirectory" negate="true" />                     </conditions>                     <action type="rewrite" url="index.php?url={r:1}" />                 </rule>             </rules>         </rewrite>     </system.webserver> </configuration> i hope can point me in right direction!
i have found solution myself. fact was, had nothing iis @ all, fault in configuration file.
Comments
Post a Comment