prestashop在IIS7 上的伪静态规则
			
			
				时间:2013-03-31 01:36来源:未知 作者:最模板 点击:次
            	默认prestashop只有在apache 上的.htaccess规则,若环境在IIS7 上,那么规则相应是web.config 最模板通过谷歌看到个老外分享的代码,欢迎测试。 ? xml version = 1.0 encoding = UTF-8 ? configuration system
			
			
				|  默认prestashop只有在apache 上的.htaccess规则,若环境在IIS7 上,那么规则相应是web.config 最模板通过谷歌看到个老外分享的代码,欢迎测试。   <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <outboundRules> <preConditions> <preCondition name="ResponseIsHtml1"> <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> </preCondition> </preConditions> </outboundRules> <rules> <clear /> <rule name="product"> <match url="([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="product.php?id_product={R:2}" /> </rule> <rule name="product home"> <match url="([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="product.php?id_product={R:1}{R:3}" /> </rule> <rule name="images"> <match url="([a-z0-9]+)-([a-z0-9]+)(-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*).jpg" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="/img/p/{R:1}-{R:2}{R:3}.jpg" appendQueryString="false" /> </rule> <rule name="image1"> <match url="([0-9]+)-([0-9]+)/([_a-zA-Z0-9-]*).jpg" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="/img/p/{R:1}-{R:2}.jpg" /> </rule> <rule name="Category" enabled="true"> <match url="^([0-9]+)\-([a-zA-Z0-9-]*)" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> </conditions> <action type="Rewrite" url="category.php?id_category={R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> 
  (责任编辑:最模板) | 
			
			 
			
			
			
			
			
			
			
			
				------分隔线----------------------------