.htaccess htaccss和urlencoded变量

.htaccess htaccss和urlencoded变量,.htaccess,url,mod-rewrite,rewrite,urlencode,.htaccess,Url,Mod Rewrite,Rewrite,Urlencode,下面是一个URL示例,当我单击站点上的按钮时,它会被传递 这是我为重写规则所做的: RewriteRule ^account/messages/compose/([0-9]+)/(.*)/([0-9]+)/?$ index.php?m=account_messages&p=compose&id=$1&sbj=$2&event=$3 [L] id和事件始终是数字,但subc can是url编码的字符串 由于它现在不起作用您的URL是否缺少正确的链接?i、 应该是吗

下面是一个URL示例,当我单击站点上的按钮时,它会被传递

这是我为重写规则所做的:

RewriteRule ^account/messages/compose/([0-9]+)/(.*)/([0-9]+)/?$ index.php?m=account_messages&p=compose&id=$1&sbj=$2&event=$3 [L]
id和事件始终是数字,但subc can是url编码的字符串 由于它现在不起作用

您的URL是否缺少正确的链接?i、 应该是吗

将以下内容添加到站点根目录中的.htaccess文件中

由于sbj和事件已经在查询字符串中,QSA标志将自动传递它们,即它将重写

相当于

‌​F+开发者和事件=836


不工作:它在做什么?它应该做什么?你还试过什么?不,这里不起作用是我的url在我的seo url关闭时的样子。www.site.com/index.php?m=account\u messages&p=compose&id=316&sbj=Web+Programmer+%2F+Developer&event=836@misulicus您使用了什么URL进行了测试,结果是什么?你的.htaccess中还有其他规则吗?这个规则是第一个吗?我在htaccess中有很多其他规则。这是一个php脚本,我只需要为脚本的这个特定部分添加一个规则。如果发送的是传统的2个参数,则$2和$3@misulicus您使用了什么URL进行了测试,结果是什么?
RewriteEngine on
RewriteBase /

RewriteRule ^account/messages/compose/([0-9]+)/$ index.php?m=account_messages&p=compose&id=$1 [L,QSA,NC]