搜索和Apache的htaccess的重写规则一个取代 [英] Search and replace in apache htaccess a RewriteRule
本文介绍了搜索和Apache的htaccess的重写规则一个取代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我基本上想获得
/path/file+name+with+plusses.mp3
改写为
/路径/与plusses.mp3文件名
在我的情况字preSS拦截了该请求,并给予404但该文件确实存在。
In my case wordpress is intercepting the request and giving a 404. But the file does indeed exist.
鉴于mod_rewrite的实施正则表达式的限制,我还没有看到这样做的简单方法。
Given the constraints of the regex in mod_rewrite implementation, I haven't yet seen a straightforward way of doing this.
推荐答案
试试这个规则:
RewriteRule ^([^+]*)\+(.*) $1\ $2 [N]
这篇关于搜索和Apache的htaccess的重写规则一个取代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文