一。修改config/下的main.php里的 'urlmanager'= array ( 'urlformat'='path', span style=color:#e53333;'showscriptname'= false ,/span 'rules'= array ( 'controller:\w+/id:\d+'='controller/view', 'controller:\w+/action:\w+/id:\d+'='controller/
一。修改config/下的main.php里的
'urlmanager'=>array( 'urlformat'=>'path', 'showscriptname'=>false,
'rules'=>array( '/'=>'/view', '//'=>'/', '/'=>'/', ), ),
二。修改网站根目录下.htaccess文件内容如下
options +followsymlinksindexignore */*rewriteengine on# if a directory or a file exists, use it directlyrewritecond %{request_filename} !-frewritecond %{request_filename} !-d# otherwise forward it to index.phprewriterule . index.php
三。在wamp中,apeach 中 的http.conf 文件中有个 rewrite, 要打开。
# loadmodule rewrite_module modules/mod_rewrite.so
要将 ‘#’ 给删除。
完成以上三步,就可以在网址 那里,去掉 index.php 隐藏。