点击登录
  • 欢迎访问无限星辰技术博客,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏无限星辰吧
  • 好集导航开张了,传送门:好集导航

WeCenter 伪静态配置

PHP学习笔记 crx349 6661次浏览 0个评论 扫描二维码

iis6 httpd.ini

[ISAPI_Rewrite]<br />3600 = 1 hour<br /><br />CacheClockRate 3600<br />RepeatLimit 32<br />RewriteRule /$ /? [L]<br />RewriteRule ^/topic/(.*) /\?\/topic/$1 [L]<br />RewriteRule ^/users/(.*) /\?\/users/$1 [L]<br />RewriteRule ^/favorite/(.*) /\?\/favorite/$1 [L]<br />RewriteRule ^/explore/(.*) /\?\/explore/$1 [L]<br />RewriteRule ^/notifications/(.*) /\?\/notifications/$1 [L]<br />RewriteRule ^/inbox/(.*) /\?\/inbox/$1 [L]<br />RewriteRule ^/people/(.*) /\?\/people/$1 [L]<br />RewriteRule ^/setting/(.*) /\?\/setting/$1 [L]<br />RewriteRule ^/logout/(.*) /\?\/logout/$1 [L]<br />RewriteRule ^/publish/(.*) /\?\/publish/$1 [L]<br />RewriteRule ^/feature/(.*) /\?\/feature/$1 [L]<br />RewriteRule ^/home/(.*) /\?\/home/$1 [L]<br />RewriteRule ^/account/(.*) /\?\/account/$1 [L]<br />RewriteRule ^/login/(.*) /\?\/login/$1 [L]<br />RewriteRule ^/reader/(.*) /\?\/reader/$1 [L]<br />RewriteRule ^/search/(.*) /\?\/search/$1 [L]<br />RewriteRule ^/crond/(.*) /\?\/crond/$1 [L]<br />RewriteRule ^/invitation/(.*) /\?\/invitation/$1 [L]<br />RewriteRule ^/admin/(.*) /\?\/admin/$1 [L]<br />RewriteRule ^/m/(.*) /\?\/m/$1 [L]<br />RewriteRule ^/question/(.*) /\?\/question/$1 [L]<br />RewriteRule ^/category/(.*) /\?\/home/explore/category/$1 [L] <br />RewriteRule ^/feed/(.*) /\?\/feed/$1 [L]<br />RewriteRule ^/article/(.*) /\?\/article/$1 [L]<br /><br />iis7 web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
    <rule name="wecenter" 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" appendQueryString="true" />
    </rule>
</rules>
</rewrite>
</system.webServer>
</configuration><br /><br /><br />nginx:在对应的nignx.conf文件里面添加<br />location / {<br />if (!-e $request_filename)<br />{<br />rewrite (.*) /index.php;<br />}<br />}<br /><br />Apache:在对应的httpd.conf或者.htaccess里面添加<br /><IfModule mod_rewrite.c><br />RewriteEngine on<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]<br /></IfModule>

无限星辰 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明WeCenter 伪静态配置!
喜欢 (0)
[]
分享 (0)

您必须 登录 才能发表评论!