申请文件,除非HTTPS时抛出404抛出、文件、HTTPS

2023-09-02 01:10:50 作者:少年未老心已荒凉

我需要建立在我的.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 在这些位置。