防止 Wordpress 将大写字母重写为小写字母 [英] Prevent Wordpress From Rewriting Capital Letters to Lowercase Letters

查看:119
本文介绍了防止 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 ^ https://$host$request_uri_low;

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

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

这篇关于防止 Wordpress 将大写字母重写为小写字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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