Yii Framework Forum: 路由模式是否能够同时支持Get和Path? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

路由模式是否能够同时支持Get和Path? Rate Topic: -----

#1 User is offline   Jackie.li 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 23-May 11

Posted 17 January 2013 - 02:29 AM

之前采用get方式跑站点,有些URL已经被用户收藏。为了SEO,要使用path模式来操作。但yii貌似不能同时支持get和path,即 index.php?r=site/login和 /site/login 这2个URL都能访问正常?

是否意味着我要从nginx或apache层面将所有 index.php?r=xxxx/xxx类似这种的全部301到 xxxx/xxx这上面? 这样的URL重写的量就非常大了,而且还容易出现错误。。。

有没有什么平滑的方式迁移?
0

#2 User is offline   ft3561572 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 16-January 13

Posted 17 January 2013 - 05:20 AM

apache下可以使用.htaccess Rewrite

不会写规则的话,有提供在线生成重定向到301的.htaccess文件的网站
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users