Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
888 views
in Technique[技术] by (71.8m points)

url - How to remove index.php in Yii Framework

enter image description hereHey guyz i am a newbie in Yii framework. I want to remove the index.php from my urls. Following the yii documentation when i put the rewrite engine code in my .htaccess file and setting showScriptName to false in my config/main.php file i get the 500 internal server error. My .htaccess file is located in root folder of my application. Tell me where i am doing wrong

UPDATE:

This is the code in my .htaccess file:

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try this

A good description is available here

http://www.yiiframework.com/doc/guide/1.1/en/topics.url#hiding-x-23x


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...