【问题标题】:Htaccess url redirect and masking, multiple query stringsHtaccess url重定向和屏蔽,多个查询字符串
【发布时间】:2014-04-09 07:55:07
【问题描述】:

我已经在stackoverflow上尝试了几乎所有重定向和htaccess屏蔽解决方案,

我可以重定向网址,即:

A. http://www.autotraderuae.com/news/man-up-/2681

重定向到:

B. http://www.autotraderuae.com/news/news_detail/man-up-/?id=2681

但我希望浏览器中的 url 在不改变 php 结构的情况下仍然显示 (A) 而不是 (B)。

当前使用的代码是:

RewriteEngine on
Options +FollowSymLinks
RewriteRule ^news/([a-z0-9-.?]+)/([0-9]+)? news/news_detail/$1/?id=$2 [L,QSA,R]

【问题讨论】:

    标签: apache .htaccess mod-rewrite url-rewriting url-masking


    【解决方案1】:

    页面重定向是因为您在末尾添加了R 标志which indicates redirect。您需要删除它并只保留 LQSA 标志。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-05
      • 1970-01-01
      • 2014-05-07
      • 2015-01-31
      • 1970-01-01
      • 1970-01-01
      • 2014-07-08
      相关资源
      最近更新 更多