【发布时间】:2016-03-15 18:32:57
【问题描述】:
如何编写链接下面给出的url重写规则。
-
匹配页面的原始网址:
http://www.cricmelive.tv/live/09876/barisal_bulls_vs_chittagong_vikings_t20
现在需要网址:
http://www.cricmelive.tv/live/09876/barisal_bulls_vs_chittagong_vikings_t20
2。频道 Catgry 的原始网址:
http://www.cricmelive.tv/live/category.php?id=1
现在需要的网址为:
http://www.cricmelive.tv/live/sports
3。 Sports Catgry 的原始网址:
http://www.cricmelive.tv/live/index.php?catid=1
现在需要的网址为:
http://www.cricmelive.tv/live/cricket
4。频道页的原始网址:
http://www.cricmelive.tv/live/channel-page.php?cid=45
现在需要:
http://www.cricmelive.tv/live/espn-3-live-streaming
我是你重写的新手。我再发一次。帮帮我,如何重新编写重写url代码原来的url
【问题讨论】:
-
前两个链接示例相等(编号 1)。
-
数字 2、3 和 4 不明确。它们具有相同的模式。所以重写规则将匹配它们。您如何确定差异?
-
如何将@Progrock
http://localhost/live/index.php?catid=2改写成http://localhost/live/cricket
标签: php .htaccess url mod-rewrite url-rewriting