0

我正在尝试创建一个新的简单节点,其 url 别名为test+node. 当我保存节点时,页面未显示节点,网址更改为

http://server/packets/test%2Bnode

但它只显示以下错误

Page not found The requested page "/packets/test%2Bnode" could not be found.

谁能帮我解决这个问题...

4

1 回答 1

0

Drupal 想要阻止“+”字符成为空格。Drupal 对字符进行编码,无法识别 URL 别名。

在此处查看此线程: https ://drupal.stackexchange.com/questions/125156/page-not-found-error-when-using-plus-sign-in-the-url-alias

最好避免在别名中使用“+”之类的字符,但也许可以尝试将其添加到您的 .htaccess 文件中,并启用干净的 URL:

RewriteEngine On
RewriteCond %{THE_REQUEST}  %2B 
RewriteRule ^(.+)$ %{REQUEST_URI} [R=301,L,QSA,NE]
于 2014-07-30T22:08:12.443 回答