简体   繁体   English

身份验证在 IIS8.5 中安装的 Wordpress 博客的子目录中不起作用

[英]Authentication not working in subdirectories of Wordpress blog installed in IIS8.5

I have a Wordpress blog installed in a IIS 8.5 machine and I'm using forms authentication using the following:我在 IIS 8.5 机器上安装了一个 Wordpress 博客,我正在使用以下形式的表单身份验证:

<authentication mode="Forms">
  <forms loginUrl="/login/login.aspx" name="authcookies" protection="All" timeout="30" path="/">
  </forms>
</authentication>

I also have:我也有:

<authorization>
  <deny users="?" />
</authorization>

to prevent unauthenticated users from accessing the blog.防止未经身份验证的用户访问博客。

When I try to access www.test.com/blog when I'm unauthenticated it redirects me to the login page but if I go to www.test.com/blog/subdir it ignores the authentication.当我在未经身份验证的情况下尝试访问www.test.com/blog时,它会将我重定向到登录页面,但如果我转到www.test.com/blog/subdir它会忽略身份验证。

Any ideas?有任何想法吗?

You will need to add a handler to force IIS to run requests for php pages through the .net authorisation pipeline.您将需要添加一个处理程序以强制 IIS 通过 .net 授权管道运行对 php 页面的请求。 Add this to the web.config inside the /blog directory:将此添加到 /blog 目录中的 web.config 中:

  <handlers>                                                                                        
        <add name="phpauth" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
    </handlers>

Make sure the preCondition matches the bitness and runtime version of your app pool确保 preCondition 与应用程序池的位数和运行时版本相匹配

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IIS8.5中的PHP站点内的Application中的ASPX页面不起作用 - ASPX pages not working in Application within PHP site in IIS8.5 OWIN Cookie身份验证无法在IIS 8.5上运行 - OWIN Cookie authentication not working on IIS 8.5 一个MapHttpRoute上带有IIS8.5的Web API 2错误401.0 - Web API 2 Error 401.0 with IIS8.5 on one MapHttpRoute 拒绝用户 windows 认证 IIS 8.5 - Denying users in windows authentication IIS 8.5 ASP.NET Process.Start在任务管理器中的工作背景,但在IIS8.5(Windows 8.1)上却不在前面 - ASP.NET Process.Start work background in task Manger but not come on front on IIS8.5 (Windows 8.1) 从IIS 7.5升级到IIS 8.5会破坏带有Hawk身份验证的OData吗? - Upgrade from IIS 7.5 to IIS 8.5 breaks OData with Hawk Authentication? IIS 8.5 中的 Windows 身份验证没有弹出 - Windows authentication in IIS 8.5 without pop up appearing ASP:Fileupload或带有AllowMultiple标记的AjaxFileUpload在IIS 8.5中不起作用 - ASP:Fileupload or AjaxFileUpload with AllowMultiple tag not working in IIS 8.5 MVC 5 身份验证在 IIS Express 中工作但不在 IIS 中 - MVC 5 Authentication working in IIS Express but not in IIS Microsoft.Practices.EnterpriseLibrary.Common在IIS 8.5中不起作用,但它在IIS 7.0中工作 - Microsoft.Practices.EnterpriseLibrary.Common is not working in IIS 8.5 but its working in IIS 7.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM