全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 746|回复: 4
打印 上一主题 下一主题

[Windows VPS] 求个WP的伪静态规则

[复制链接]
跳转到指定楼层
1#
发表于 2013-3-26 10:45:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
刚安装的wp不会搞伪静态

求个规则
2#
发表于 2013-3-26 10:46:20 | 只看该作者
官方就有
http://codex.wordpress.org/zh-cn:%E4%BD%BF%E7%94%A8%E5%9B%BA%E5%AE%9A%E9%93%BE%E6%8E%A5
3#
发表于 2013-3-26 10:48:36 | 只看该作者
apache的.htaccess
  1. # BEGIN WordPress
  2. <IfModule mod_rewrite.c>
  3. RewriteEngine On
  4. RewriteBase /

  5. RewriteCond %{REQUEST_FILENAME} ^wp-content.*
  6. RewriteCond %{REQUEST_FILENAME} ^wp-admin.*
  7. RewriteCond %{REQUEST_FILENAME} ^wp-include.*
  8. RewriteCond %{REQUEST_FILENAME} !-f
  9. RewriteCond %{REQUEST_FILENAME} !-d
  10. RewriteRule . /index.php [L]
  11. </IfModule>
  12. # END WordPress
复制代码
IIS的web.config
  1. <rewrite>
  2.     <rules>
  3.         <rule name="Main Rule" stopProcessing="true">
  4.             <match url=".*" />
  5.             <conditions logicalGrouping="MatchAll">
  6.                 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  7.                 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  8.             </conditions>
  9.             <action type="Rewrite" url="index.php/{R:0}" />
  10.         </rule>
  11.     </rules>
  12. </rewrite>
复制代码
nginx
  1. if (!-e $request_filename){
  2. rewrite (.*) /index.php;
  3. }
复制代码
4#
发表于 2013-3-26 10:50:02 | 只看该作者
iyuheng 发表于 2013-3-26 10:48
apache的.htaccessIIS的web.confignginx

好专业啊
5#
发表于 2013-3-26 11:24:26 | 只看该作者
lnmp安装的时候选择就可以啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-10-31 06:02 , Processed in 0.063357 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表