防止 Wordpress 将大写字母重写为小写字母

编程入门 行业动态 更新时间:2024-10-27 10:31:38
本文介绍了防止 Wordpress 将大写字母重写为小写字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我希望有人能帮我找到这个重写的来源(搜索了我所有的 nginx 文件,但它不在那里.我猜它是包含中的 WP 重写?)并帮助我防止重写转换我的大写路径字母到小写字母.

I am hoping that someone can help me locate where this rewrite is coming from (searched all my nginx files and its not there. I'm guessing it's a WP rewrite in includes?) and help me prevent the rewrite from converting my uppercase path letters to lowercase letters.

示例:如果您在浏览器中导航到此图片(下方),请注意 URL 已被重写.这不是我创建的重写,但它是有效的,因为点击我在线索引的旧博客图像的用户需要重写才能查看它们.但是大写字母H"被转换为小写字母h",因此用户将无法查看它!如果您将 URL 字符串中的小写字母修改为大写字母并点击页面,您现在可以看到图像.

Example: If you navigate to this image (below) in a browser please notice that the URL is rewritten. This is not a rewrite I created but it works out because users that are hitting my old blog images which are indexed online will need the rewrite to view them. BUT the uppercase letter 'H' is converted to lowercase 'h' so the user will not be able to view it! If you modify the lowercase to an uppercase in the URL string and hit the page you can now see the image.

有人可以帮我解决这个问题吗?顺便说一下,我无法重命名所有图像.此外,我正在使用 nginx,我听说您没有像使用 apache 那样大声地从 nginx 中删除区分大小写的功能.

Can someone please help me solve this issue? I cannot rename all my images by the way. Also I am using nginx and i hear that you are not aloud to remove case sensitivity from nginx like you can with apache.

推荐答案

Nginx 包含一个大写转小写的方法:

Nginx includes a method for converting uppercase to lowercase:

rewrite ^ $host$request_uri_low;

确保您的配置没有这种转换.

make sure you config doesn't have this kind of conversion.

更多推荐

防止 Wordpress 将大写字母重写为小写字母

本文发布于:2023-10-16 17:04:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1498191.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:大写字母   重写   字母   Wordpress

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!