
在/ development中还有另一个wordpress安装,它使用以下web.config
<?xml version="1.0" enCoding="UTF-8"?><configuration> <system.webServer> <rewrite> <rules> <rule name="wordpress1" patternSyntax="Wildcard"> <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"/> </rule></rules> </rewrite> <staticContent> <clIEntCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/> <remove fileExtension=".woff"/> <remove fileExtension=".woff2"/> <mimeMap fileExtension=".woff" mimeType="application/x-Font-woff"/> <mimeMap fileExtension=".woff2" mimeType="application/Font-woff2"/> </staticContent> </system.webServer></configuration> 但是,在子文件夹中,相当固定链接无法在此站点上运行
但是,当选择了普通永久链接时,主页可以使用此子文件夹
有什么想法吗?
解决方法 pee2pee说的答案是将该行放在代码中.<remove name="YourRulename"/>
要执行此 *** 作,您必须首先查看root的web.config文件并查找此行.
<rule name = "YourRulename" patternSyntax = "Wildcard">
然后复制目录或子文件夹的web.config文件中的行,将“YourRulename”更改为您在第一个标记上方的根目录的web.config文件中找到的名称.
然后,您的子文件夹的web.config文件应该是这样的
<?xml version="1.0" enCoding="UTF-8"?><configuration> <system.webServer> <rewrite> <rules> <remove name="YourRulename"/> <rule name="YourSubFolderRulename" patternSyntax="Wildcard"> <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"/> </rule></rules> </rewrite> </system.webServer></configuration> 我希望它对我来说很有帮助.
总结以上是内存溢出为你收集整理的web.config无法使用子文件夹中的WordPress永久链接全部内容,希望文章能够帮你解决web.config无法使用子文件夹中的WordPress永久链接所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)