专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > WordPress

WordPress伪静态配置规则分Nginx/Apache/IIS

发布时间: 文章来源:www.iduyao.cn 采编人员:毒药  
Nginx伪静态规则
location / {
	try_files $uri $uri/ /index.php?$args;
}
 
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

Apache伪静态规则
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

IIS伪静态规则
[ISAPI_Rewrite]
# Defend your computer from some worm attacks
#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
# 3600 = 1 hour

CacheClockRate 3600
RepeatLimit 32
 
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through

RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /software-files/(.*) /software-files/$1 [L]
RewriteRule /images/(.*) /images/$1 [L]
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。
   1349阅读
目前尚无回复
登录 后发表评论

热门分类:

Web开发 | Web前端 | HTML/CSS | php | ASP | JavaScript | jQuery | HTML5 | vbScript | Ajax | 网页设计 | 跨浏览器开发 | 高性能WEB开发 | Web Service | XML/SOAP | CGI | 数据库 | SQL | MySQL | NoSQL | Oracle技术 | Oracle管理 | Oracle开发 | Oracle面试 | Oracle Exception | Sql Server | Informix | Sybase | DB2 | Access | VFP | 数据仓库 | 高性能数据库开发 | 其他数据库 | 移动开发 | Android | Iphone | Windows Mobile | Symbian | BlackBerry | QT开发 | Brew | MeeGo | 移动平台 | 电信IT应用开发 | 移动应用 | Java Web开发 | J2EE | J2SE | J2ME | Java面试 | Java相关 | Eclipse | Java Exception | 企业开发 | 企业信息化 | 行业应用 | GIS | SAP | Tivoli | Lotus | Exchange | SharePoint | Dynamics CRM | K2 BPM | 报表 | 嵌入开发 | WinCE | 硬件开发 | 单片机 | 汇编语言 | 驱动开发 | Wireless | VxWorks | 应用服务器 | Apache | IIS | JBoss | WebSphere | Weblogic | ColdFusion | 研发管理 | 项目管理 | 开发过程 | 开发方法 | 软件设计 | 设计模式 | 软件架构设计 | 敏捷开发 | 微创软件开发 | CVS/SVN | VSTS | PowerDesigner | Rational | 软件测试 | C# | ASP.NET | WinForm | WCF | CLR | WPF | XNA | Visual Studio | WinRT Metro | .NET Framework | VB Dotnet | VC | .NET分析设计 | .NET组件控件 | J# | Delphi | .NET报表 | LINQ | .NET新技术 | .NET面试 | .NET相关 | DotNet Exception | Linux/Unix | Solaris | AIX | 多媒体/流媒体开发 | 多媒体设计 | 交互式开发 | Flash | 图形/图像 | 图像工具使用 | Flex | AutoCAD | Silverlight | C++ | C语言 | C++ Builder | 网络通信 | PB | Ruby/Rails | Perl/Python | Erlang | Go | Swift | Verilog | 编程 | 其他开发语言 | Open API | 信息/网络安全 | IBM云计算 | Paypal | VOIP | Google技术 | 人工智能