wordpress在WIN IIS系统中实现iis伪静态态该怎么做?

温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(676)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_',
blogTitle:'wordpress在win主机iis下实现伪静态的方法',
blogAbstract:'我的博客是放在windows主机下的,大家都知道一般我们使用wordpress都会将固定链接设置成伪静态的,但是WP却只能在LINUX系统 的服务器中才能很好的使用,在windows系统的iis中设置伪静态会在前面加上index.php,所以无法实现真正的伪静态功能。 看了萧涵大哥的文章后,终于搞定了'
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}wordpress程序在win和Linux系统下的伪静态设置
稿源:张力疯子
这是一篇很早就应该写的文章,而在昨天就有朋友问我,为什么不写一下关于wordpress的伪静态设置呢?今天这篇文章我就来跟大家说一下,关于wordpress程序在win和Linux系统下的伪静态设置方法。 & &
第一种:win系统下的wordpress程序伪静态。 & &
wordpress在win系统下的伪静态前提是必须空间系统支持伪静态设置,而我们也知道一般win系统支持的伪静态规则为httpd.ini格式的,那我们首先就先新建一个文本文档,将以下代码复制粘贴在里面(这是我至今为止搜集到的最完美的win系统伪静态规则)。 &
[ISAPI_Rewrite] & # 3600 = 1 hour &
CacheClockRate 3600 &
RepeatLimit 32 &
# Protect httpd.ini and httpd.parse.errors files &
# from accessing through HTTP &
# wordpress 伪静态规则 &
# For tag(中文标签以及标签翻页的规则) &
RewriteRule /tag/(.*)/page/(\d+)$ /index\.php\?tag=$1&paged=$2 &
RewriteRule /tag/(.+)$ /index\.php\?tag=$1 &
# For category(中文分类以及分类翻页的规则) &
RewriteRule /category/(.*)/page/(\d+)$ /index\.php\?category_name=$1&paged=$2 &
RewriteRule /category/(.*) /index\.php\?category_name=$1 &
# For sitemapxml &
RewriteRule /sitemap.xml /sitemap.xml [L] &
RewriteRule /sitemap.html /sitemap.html [L] &
RewriteRule /sitemap_baidu.xml /sitemap_baidu.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] & &
将以上代码复制粘贴到文本文档后,我们再将文本另存为httpd.ini,这样我们的伪静态规则就弄好了,我们只需要将这个文件上传到空间更目录,如果在后台&固定链接选择自定义链接输入/%category%/%post_id%.html或是/%post_id%.html点击保存就可以了,这里面我们还需要一个插件的支持,那就是去除分类URL中间的category,我们只需要在后台插件&安装插件那搜索WP No Category Base,安装启用就可以了。这样我们win系统下的wordpress程序伪静态就完成了。 & &
第二种:Linux系统下的伪静态设置 & &
这一种就是非常简单的,我们知道Linux系统本身使用wordpress是最完美的系统,它的伪静态设置是非常简单的,我们只需要在后台&固定链接选择自定义链接输入/%category%/%post_id%.html或是/%post_id%.html点击保存就可以了。同样它这里也是需要配合WP No Category Base插件的,下面我就将Linux系统支持的.htaccess伪静态规则内容写出来。
代码如下: & &
# BEGIN WordPress & &
RewriteEngine On & RewriteBase / &
RewriteRule ^index\.php$ - [L] &
RewriteCond %{REQUEST_FILENAME} !-f &
RewriteCond %{REQUEST_FILENAME} !-d &
RewriteRule . /index.php [L] & &
# END WordPress & &
以上代码也是一样,需要我们新建一个文本文档,然后将代码复制粘贴进去,点击另存为.htaccess文件,再将此文件上传至空间根目录下就完成了。 & &
这篇文章就写到这里了,希望对那些在使用wordpress程序时不知道伪静态怎么设置的朋友有一些帮助,如果大家有什么不明白的,可以留言给我,谢谢! & &
本文由张力博客原创写作,转载请注明网址:/820.html,谢谢!
文章:9篇人气:51527
草根站长一个,小博主一名,喜欢研究,关注互联网,热衷于搜索引擎优化和网络营销的实践与研究,并长期从事于网站运营策划、网络营销推广、淘宝营销推广等工作!
张力博客:/
本网页浏览已超过3分钟,点击关闭或灰色背景,即可回到网页需求发布后1小时内收到服务商响应每个需求平均有10个服务商参与95%以上的需求得到了圆满解决所有需求不向雇主收取任何佣金双11电商狂欢 爆款服务超乎你想像
win03 iis wordpress 伪静态设置问题
有相似问题想解决?专业顾问来帮助您
已投标服务商
综合评分:0颗星
速度:0.00
服务:0.00
态度:0.00
好评率:0%
共有2个服务商参与报价,查看更多服务商报价
参与报价,开始赚钱
提交你的报价和方案
中标后交付作品
获得任务赏金
极速:10分钟急速响应
高品质:精选服务商提供服务
放心:不满意可退款
根据浏览的需求为您推荐
交易成功的需求
关注猪八戒微信1022人阅读
服务器(3)
IIS配置(1)
目前我使用的是一个名为的实现的伪静态功能
下载并且安装好对应版本的ISAPI Rewrite
注意:要给ISAPI_Rewrite.dll所在的目录加上IIS_WPG组的写入和读取权限,否则无法加载对应dll文件。
复制以下代码到你的ISAPI_Rewrite.dll目录里面的httpd.conf并保存.
[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]
接下来,在IIS中选择相应的站点,在ISAPI筛选器中加载ISAPI_Rewrite.dll就可以了,加载完可以直接浏览看看是否正常
或者重启IIS、停止网站再启动即可。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:107448次
积分:1182
积分:1182
排名:千里之外
原创:23篇
转载:11篇
评论:10条
(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(3)(2)(1)(8)(5)(3)
(window.slotbydup = window.slotbydup || []).push({
id: '4740881',
container: s,
size: '200,200',
display: 'inlay-fix'Windows Server 2012 R2下WordPress IIS8.5伪静态规则设置 | 系统运维
技术交流QQ群:& && && &
现在的位置:
Windows Server 2012 R2下WordPress IIS8.5伪静态规则设置
操作系统:Windows Server 2012 R2
Web服务器:IIS 8.5
网站程序:WordPress
网站根目录:C:\inetpub\wwwroot
网站域名:
实现目的:
配置WordPress伪静态
具体操作:
一、确认IIS 8.5是否安装IIS URL Rewrite
打开:控制面板\系统和安全\管理工具\Internet Information Services (IIS)管理器
看到URL重写,说明已经安装了IS URL Rewrite,否则要先安装此插件。
IIS URL Rewrite下载:
双击默认安装即可
二、添加IIS 8.5伪静态规则文件
1、新建web.config文件,添加以下代码,保存
&?xml version="1.0" encoding="UTF-8"?&
&configuration&
&system.webServer&
&rule name="category"&
&match url="category/?(.*)" /&
&conditions logicalGrouping="MatchAll" trackAllCaptures="false" /&
&action type="Rewrite" url="/index.php?category_name={R:1}" appendQueryString="false" logRewrittenUrl="false" /&
&rule name="tags"&
&match url="tag/?(.*)" /&
&conditions logicalGrouping="MatchAll" trackAllCaptures="false" /&
&action type="Rewrite" url="index.php?tag={R:1}" /&
&rule name="Main Rule" stopProcessing="true"&
&match url=".*" /&
&conditions logicalGrouping="MatchAll" trackAllCaptures="false"&
&add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&
&add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&
&/conditions&
&action type="Rewrite" url="index.php/{R:0}" /&
&rule name="wordpress" patternSyntax="Wildcard"&
&match url="*" /&
&conditions logicalGrouping="MatchAll" trackAllCaptures="false"&
&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&
2、把web.config拷贝到网站根目录:C:\inetpub\wwwroot下
三、设置WordPress
进入网站管理后台
设置-固定链接-自定义结构
填写:/archives/%post_id%.html
温馨提醒:qihang01原创内容 版权所有,转载请注明出处及原文链接
打开/archives/1.html,如下图所示
至此,Windows Server 2012 R2下WordPress IIS8.5伪静态规则设置完成。
&&&&&>> 本文链接:>> 订阅本站:>> 转载请注明来源: >>
&&系统运维技术交流QQ群:①& ②& ③&
【上篇】【下篇】
您可能还会对这些文章感兴趣!
您必须才能发表留言!
本分类最新文章
日志总数:336篇
评论总数:1030条
分类总数:70个
标签总数:479个
友情链接:36个
网站运行:2267天
最后更新:日
欢迎PR值≥3的IT类技术博客与本站友情链接(申请前请先做好本站链接)
Copyright&
系统运维 All rights reserved
版权声明:本站所有文章均为作者原创内容,如需转载,请注明出处及原文链接}

我要回帖

更多关于 iis伪静态 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信