Php urlencode后禁止的错误

Php urlencode后禁止的错误,php,.htaccess,Php,.htaccess,我在使用urlencode()时遇到问题,无法找到解决方案。 我试图从我的数据库中获取一篇标题末尾带有问号的文章: new1/articles/details.php?name=test? 我使用.htaccess使链接友好,如下所示: 重新编写引擎打开 重写基/新1/ 重写cond%{REQUEST_FILENAME}-D 重写cond%{REQUEST_FILENAME}-F 重写规则^articles/([^/]+)/?$articles/details.php?name=$1[L,QS

我在使用
urlencode()
时遇到问题,无法找到解决方案。 我试图从我的数据库中获取一篇标题末尾带有问号的文章:

new1/articles/details.php?name=test?
我使用.htaccess使链接友好,如下所示:

重新编写引擎打开
重写基/新1/
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-F
重写规则^articles/([^/]+)/?$articles/details.php?name=$1[L,QSA,NC]
当我尝试使用
urlencode
时,我得到了禁止的(403)错误。 如果我使用
base64\u encode()
它可以工作,但我希望有好的URL。 这是我的访问日志:

127.0.0.1---[24/Jul/2014:11:48:54+0300]“GET/new1/articles/test+%3F HTTP/1.1”403306
这来自Apache错误日志:

[client 127.0.0.1:50434]AH00036:访问/new1/articles/test+?失败(文件系统路径“C:/wamp/www/new1/articles/test+?”),请参阅:http://localhost/new1/articles/

您只需要对
名称
字段进行urlencode。我就是这样做的:确定显示
变量转储的输出(urlencode($row['name'))字符串'test+%3F'(长度=8),您是否看到
http://example.com/new1/articles/test+%您的浏览器中是否有3F