当前位置: 首页 > 工具软件 > WeCenter > 使用案例 >

WeCenter各种环境伪静态规则大全

夹谷沛
2023-12-01

WeCenter各种环境伪静态配置大全

.htaccess 伪静态规则、httpd.ini伪静态规则、ii7和ii8及以上web.config伪静态规则

WeCenter .htaccess 伪静态代码:

<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^index.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule>

 

WeCenter httpd.ini伪静态代码:

CacheClockRate 3600RepeatLimit 32RewriteBase /RewriteRule /static/(.) /static/$1RewriteRule /uploads/(.) /uploads/$1RewriteRule /(.*) /index.php/$1

IIS8.0伪静态代码(完整web.config文件区别代码):

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><rewrite><rules><rule name="WeCenter" patternSyntax="Wildcard"><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"/></rule></rules></rewrite></system.webServer></configuration>

 

根据你需求取舍伪静态代码。

iiS7.0以上(WeCenter web.config)伪静态代码:

<rule name="Static" stopProcessing="true"><match url="^static/(.*)$" /><action type="Rewrite" url="static/{R:1}" /></rule><rule name="Uploads" stopProcessing="true"><match url="^uploads/(.*)$" /><action type="Rewrite" url="uploads/{R:1}" /></rule><rule name="site" stopProcessing="true"><match url="^(.*)$" /><action type="Rewrite" url="index.php?/{R:1}" appendQueryString="true" logRewrittenUrl="true" /></rule><rule name="cnUrl ht" stopProcessing="true"><match url="^topic/(.*)$" /><action type="Rewrite" url="cnurl.php" /></rule>
 类似资料: