【发布时间】: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