Yii Framework Forum: 404 error occured when hiding index.php - Yii Framework Forum

Jump to content

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

404 error occured when hiding index.php Rate Topic: -----

#1 User is offline   wangxiantong 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 29-March 12

Posted 22 April 2012 - 04:53 AM

I am studying the demo "hangman" and try to hide the index.php by setting the urlmanager as follows in the main config file:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'game/guess/<g:\w>'=>'game/guess',
),
),

which is the only change i made to this demo. And 404 error occured in the guess page:

"Not Found

The requested URL /yii_1_10/demos/hangman/game/guess/L was not found on this server."

The httpd.conf contains the following lines:
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>

My environment is: winxp/Apache2.2.21/php5.2.17/yii1.1.10
0

#2 User is offline   Maurizio Domba 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,228
  • Joined: 12-October 09
  • Location:Croatia

Posted 22 April 2012 - 05:09 AM

did you check / add the .htaccess file?

Check again the documentation for this - http://www.yiiframew...rl#hiding-x-23x
Find more about me.... btw. Do you know your WAN IP?
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