Yii Framework Forum: Url Rewrite - Yii Framework Forum

Jump to content

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

Url Rewrite Url Rewrite is not work Rate Topic: -----

#1 User is offline   gaoqingsiner 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 14-March 13

Posted 14 March 2013 - 04:40 AM

I meet a question when i use urlManager like :
Not Found
The requested URL /yiitest/site/contact was not found on this server.

my config is :
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false, // 这一步是将代码里链接的index.php隐藏掉。
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),


<IfModule rewrite_module>

Options +FollowSymLinks

IndexIgnore */*

RewriteEngine On



RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php

</IfModule>

and in httpd.conf i set
LoadModule rewrite_module modules/mod_rewrite.so



why?
0

#2 User is offline   jfcat 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 13-February 12

Posted 24 March 2013 - 10:59 PM

你的目录结构是怎么样的,是否目录结构错了,还是说rewrite错了,你可以测试下这个地址是否有到index.php,然后再找问题
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