.htaccess RewriteRule 要更改吗?到&
我在跟踪 AdWords 访问者时遇到问题。由于网址格式错误,它们不会显示在分析中。花了几个小时尝试编辑我当前的 .htaccess,但没有找到解决方案。我当前的 .htaccess:
RewriteRule ^$ index.php [NC]
RewriteCond %{REQUEST_FILENAME} !(upload||media|admin|index\.php)
RewriteRule .* template.php?seo_url=$0& [PT,L]
因此,当访问者来自 adwords 时,浏览器中的 url 如下所示: http://www.example.com/section?gclid=XXXXX
服务器端网址为:http://www.example.com?seo_url=section?gclid=XXXXX
您能帮我更改 .htaccess 以执行服务器端网址,如 http:// www.example.com?seo_url=section&gclid=XXXXX
谢谢。
I have problem tracking visitors from Adwords. They do not show in analytics, because of bad url formating. Spent hours to trying edit my current .htaccess, but found no solution. My current .htaccess:
RewriteRule ^$ index.php [NC]
RewriteCond %{REQUEST_FILENAME} !(upload||media|admin|index\.php)
RewriteRule .* template.php?seo_url=$0& [PT,L]
So when visitor comes from adwords, url in browser looks like:http://www.example.com/section?gclid=XXXXX
Server side url is: http://www.example.com?seo_url=section?gclid=XXXXX
Could you help me to change .htaccess to do server side url like http://www.example.com?seo_url=section&gclid=XXXXX
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际应该发生的是,原始查询字符串应该被丢弃,只保留 RewriteRule 查询字符串。为了避免这种情况,请使用 QSA 标志。像这样的东西
What should actually happen is that the original query string should be discarded and only the RewriteRule query string should remain. To avoid that, use the QSA flag. Something like
尝试像这样的 RewriteRule:
Try a RewriteRule like this: