服务器配置实现的apache 的话,配置文件里:查找DirectoryIndex index.html,在下面添加 
DirectoryIndex index.htm 
DirectoryIndex default.htm 
DirectoryIndex default.html 
DirectoryIndex index.php 
DirectoryIndex index.php3 
DirectoryIndex index.cgi 

解决方案 »

  1.   

    url重写,可以google一下rewrite!在iis和apache上都能配置的!
      

  2.   

    二楼正解 rewrite
    apache参考http://faq.comsenz.com/viewnews-12
    iis参考http://faq.comsenz.com/viewnews-11
    虚拟主机的话,一般添加一个写有rewrite规则的.htaccess文件即可
      

  3.   

    http://zh.wikipedia.org/w/index.php?title=URL%E9%87%8D%E5%AF%AB&variant=zh-cn
      

  4.   

    我也有和楼主一样的问题
    在.Net下有组件可以达到URL转发的效果
    只是我的php程序用的是虚拟主机,没权限动服务器配置
    该怎么搞?
      

  5.   

    虚拟主机可以写自己的.htaccess文件,应该可以解决。
      

  6.   

    url重写,可以去了解Zend FrameWork 或CodeIgniter 框架
      

  7.   


    支持一下,虚拟主机都开放了.htaccess的