申请文件,除非HTTPS时抛出404 [英] Throw 404 when requesting file unless HTTPS

查看:241
本文介绍了申请文件,除非HTTPS时抛出404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要建立在我的.htaccess文件的情况,当用户请求的文件通过HTTP,将给予404,但不是当他们在提出要求HTTPS。我在这需要发生以(但不包括其他人)在同一目录约15个文件。

I need to create a condition in my .htaccess file that will give a 404 when a user requests a file over HTTP, but not when they request it over HTTPS. I have about 15 files in the same directory that this needs to happen with (but not the others).

推荐答案

使用的 重定向 的状态为 404 在这些位置。

这篇关于申请文件,除非HTTPS时抛出404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆