博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
apache默认对进行了编码的url 返回 404
阅读量:4217 次
发布时间:2019-05-26

本文共 342 字,大约阅读时间需要 1 分钟。

我们通常使用 urlencode()之类的函数将斜线编码成%开头的字符串

但是默认情况下

apache发现请求的URL中有对斜线的编码后的字符,是会返回404页面的

此时,就用到了 AllowEncodedSlashes on 指令允许请求继续被处理

如果apache配置的https,那么http和https需要分别配置。

我用的apache是 Apache/2.4.6 (CentOS) 

http的配置文件和ssl配置文件是分开的。

在httpd.conf 中直接在文件中增加 AllowEncodedSlashes On 

重启就生效了,而https 直接放到配置ssl.conf中是没有生效。后来查到是放到<VirtualHost *:443> 这个标签里边。

重启后终于生效。

你可能感兴趣的文章
USB History Viewing
查看>>
怎样做可靠的分布式锁,Redlock 真的可行么?
查看>>
[图文] Seata AT 模式分布式事务源码分析
查看>>
pm 源码分析
查看>>
Sending the User to Another App
查看>>
kmsg_dump
查看>>
Getting a Result from an Activity
查看>>
Allowing Other Apps to Start Your Activity
查看>>
dev/mem
查看>>
pfn_valid 源码分析
查看>>
dev/kmem 和dev/mem的区别
查看>>
checkbox
查看>>
Sending Simple Data to Other Apps
查看>>
Receiving Simple Data from Other Apps
查看>>
中断API之__tasklet_schedule
查看>>
中断API之enable_irq
查看>>
中断API之disable_irq
查看>>
nova 中的guestfs
查看>>
nova中的localfs
查看>>
utils/rpm_build.sh
查看>>