与&QUOT错误;%QUOT;和.htaccess中 [英] Error with "%" and Htaccess
问题描述
我有一个htaccess的问题,包含%辛博尔一些网址。
I have a htaccess problem with some URLs that contains the % simbol.
例如:......他,失去了10%做为他的-money.html
For example: .......he-lost-10%-of-his-money.html
错误的请求 您的浏览器发送该服务器无法理解的请求。 此外,试图使用ErrorDocument来处理请求404未找到时遇到错误。的
Bad Request Your browser sent a request that this server could not understand. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
在我的htaccess的:
In my htaccess:
重写规则^([^ /] +)。HTML $ abc.php?URL = $ 1 [L]
RewriteRule ^([^/]+).html$ abc.php?url=$1 [L]
我应该做些什么?
推荐答案
根据你在做什么,在这里看到:
Depending on what you're trying to do, see here:
的.htaccessmod-rewrite规则和&符号(第一个答案,适用于%字符,如果你传递的URL)
.htaccess mod rewriterule and ampersands (first answer, applicable for % character if you're passing the URL)
htaccess的,以逃避网址百分比(%)
<一个href="http://stackoverflow.com/questions/4988127/htaccess-mode-rewrite-match-percent-symbol-problem">.htaccess mode_rewrite匹配百分号问题
<一个href="http://stackoverflow.com/questions/3235219/urlen$c$cd-forward-slash-is-breaking-url">urlen$c$cd正斜杠打破网址
... <一个href="http://stackoverflow.com/search?q=htaccess+percent">http://stackoverflow.com/search?q=htaccess+percent
如果URL的内容=心不是始发/请求的脚本但传递的变量,你需要的 rawurlen code 它在orginating PHP脚本。
If the content of url= isnt the originating/requested script but a passed variable, you will need to rawurlencode it in the orginating PHP script.
这篇关于与&QUOT错误;%QUOT;和.htaccess中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!