如何向 drupal mod_rewrite 添加另一个通配符变量?
您好,我有一个 Drupal 网站,目前有一些像这样的 URL...
http:// /www.example.com/exhibitions/2011/artist?p=works
我打开了 Drupal 的干净 URL 来创建此 URL。末尾的“p”$_GET 变量来自我的节点模板,用于显示节点中的不同字段。
我想使用 mod_rewrite 将网址更改为:
http://www.example。 com/exhibitions/2011/artist/works
但是我不确定如何使其适应 Drupal 当前的 RewriteRules...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
感谢您的帮助!
Hello I have a Drupal site that currently has some URL's like this...
http://www.example.com/exhibitions/2011/artist?p=works
I have Drupal's clean URL's turned on to create this url. The 'p' $_GET variable at the end is coming from my node template, which is used to show different fields from the node.
I would like to use mod_rewrite to change the url to this:
http://www.example.com/exhibitions/2011/artist/works
However im not sure how to adapt this to Drupal's current RewriteRules...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将此规则附加到 .htaccess 文件末尾:
Append this rule at the end of your .htaccess file: