您试图重写现有数据库-现在买2017款的车是库存车吗
发布时间:2023-03-12 09:13 浏览次数:次 作者:佚名
问题描述
I am trying to do a very simple rewrite rule and having no luck.
我试图做一个非常简单的重写规则您试图重写现有数据库您试图重写现有数据库,没有运气。 What I want to do is take all traffic that comes to a specific page and append a static query string.
我想做的是获取所有进入特定页面的流量,并附加一个静态查询字符串。 This is what I am doing and it does not append anything:
这是我正在做的事情,它不附加任何内容:
RewriteRule ^/subdir/test.html$ /subdir/test.html?utm_source=delta&utm_medium=radio&utm_campaign=test [QSA,L]
Can anyone tell me what I am doing wrong?
谁能告诉我我在做什么错? Many thanks in advance!
提前谢谢了!
I will answer my own question in case someone else has this problem.
如果其他人有此问题,我将回答我自己的问题。 You need to add an additional condition to make sure the query string is empty or it will keep appending inn a loop.
您需要添加其他条件,以确保查询字符串为空,否则它将继续在循环中附加inn。
RewriteCond %{QUERY_STRING} ^$
RewriteCond%{QUERY_STRING} ^ $