wecenter 伪静态(nginx,apache,iis环境)

豆瓜

豆瓜

豆瓜官网专栏

独家首发
豆瓜 2019-09-23 22:44:46

wecenter 伪静态(nginx,apache,iis环境)


以宝塔面板为例:


nginx


 location / { if (!-e $request_filename) { rewrite (.*) /index.php; } } 


Apache:在对应的httpd.conf或者.htaccess里面添加 RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 


IIS6 Rewrite组件:在对应的配置文件httpd.ini里面添加 [ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 RewriteRule /$ /? [L] RewriteRule ^/topic/(.*) /\?\/topic/$1 [L] RewriteRule ^/users/(.*) /\?\/users/$1 [L] RewriteRule ^/notifications/(.*) /\?\/notifications/$1 [L] RewriteRule ^/inbox/(.*) /\?\/inbox/$1 [L] RewriteRule ^/follow/(.*) /\?\/follow/$1 [L] RewriteRule ^/people/(.*) /\?\/people/$1 [L] RewriteRule ^/setting/(.*) /\?\/setting/$1 [L] RewriteRule ^/logout/(.*) /\?\/logout/$1 [L] RewriteRule ^/publish/(.*) /\?\/publish/$1 [L] RewriteRule ^/feature/(.*) /\?\/feature/$1 [L] RewriteRule ^/home/(.*) /\?\/home/$1 [L] RewriteRule ^/account/(.*) /\?\/account/$1 [L] RewriteRule ^/login/(.*) /\?\/login/$1 [L] RewriteRule ^/reader/(.*) /\?\/reader/$1 [L] RewriteRule ^/search/(.*) /\?\/search/$1 [L] RewriteRule ^/crond/(.*) /\?\/crond/$1 [L] RewriteRule ^/admin/(.*) /\?\/admin/$1 [L] RewriteRule ^/invitation/(.*) /\?\/invitation/$1 [L] RewriteRule ^/m/(.*) /\?\/m/$1 [L] RewriteRule ^/question/(.*) /\?\/question/$1 [L] RewriteRule ^/category/(.*) /\?\/home/explore/category/$1 [L] 


如果你是安装在:您的域名/xxx/这样的目录下面,对应的配置文件分别为:


 nginx:在对应的nignx.conf文件里面添加 location /xxx/ { if (!-e $request_filename) { rewrite (.*) /xxx/index.php; } }


 Apache:在对应的httpd.conf或者.htaccess里面添加 



 RewriteBase /xxx/ RewriteEngine On

 RewriteCond %{REQUEST_FILENAME} !-f

 RewriteCond %{REQUEST_FILENAME} !-d

 RewriteRule . /xxx/index.php 


 IIS6 Rewrite组件:在对应的配置文件httpd.ini里面添加 [ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 RewriteRule /$ /? [L] RewriteRule ^/topic/(.*) /\?\/topic/$1 [L] RewriteRule ^/users/(.*) /\?\/users/$1 [L] RewriteRule ^/notifications/(.*) /\?\/notifications/$1 [L] RewriteRule ^/inbox/(.*) /\?\/inbox/$1 [L] RewriteRule ^/people/(.*) /\?\/people/$1 [L] RewriteRule ^/setting/(.*) /\?\/setting/$1 [L] RewriteRule ^/logout/(.*) /\?\/logout/$1 [L] RewriteRule ^/publish/(.*) /\?\/publish/$1 [L] RewriteRule ^/feature/(.*) /\?\/feature/$1 [L] RewriteRule ^/home/(.*) /\?\/home/$1 [L] RewriteRule ^/account/(.*) /\?\/account/$1 [L] RewriteRule ^/login/(.*) /\?\/login/$1 [L] RewriteRule ^/reader/(.*) /\?\/reader/$1 [L] RewriteRule ^/search/(.*) /\?\/search/$1 [L] RewriteRule ^/crond/(.*) /\?\/crond/$1 [L] RewriteRule ^/admin/(.*) /\?\/admin/$1 [L] RewriteRule ^/invitation/(.*) /\?\/invitation/$1 [L] RewriteRule ^/m/(.*) /\?\/m/$1 [L] RewriteRule ^/question/(.*) /\?\/question/$1 [L] RewriteRule ^/category/(.*) /\?\/home/explore/category/$1 [L] 3, 


以管理员身份登录,进入管理后台 => 全局 => 站点功能 => 开启 Rewrite 伪静态:


本文由 豆瓜 投稿发布,并经过豆瓜编辑。本文地址:https://www.dougua.net/a/1371.html

转载此文章须经作者同意,并附上出处(本站原创)及本页链接。原文链接:https://www.dougua.net/

若稿件文字、图片、视频等内容侵犯了您的权益,请联系本站进行 投诉处理

豆瓜

豆瓜

豆瓜官网专栏

  • Xshell后门查杀工具

    豆瓜 · 今天 15:40:57 · 226浏览
  • discuz论坛重置密码

    豆瓜 · 今天 14:15:20 · 98浏览
  • 入侵打包技术

    豆瓜 · 今天 11:24:50 · 230浏览
  • 全部评论

    豆瓜

    豆瓜

    豆瓜官网专栏

  • Xshell后门查杀工具
  • discuz论坛重置密码
  • 入侵打包技术
  • 网络渗透中的一些细节和技巧
  • 验证码不显示怎么办?
  • 我来说两句