想自动执行index.php,在apache的httpd.conf里设过DirectoryIndex,不管用??我刚装上DEDECMS,,,点显示首页,能自动找到,,但是点别的栏目,比如http://127.0.0.1/Dedecms/ask  就无法显示了.必须手动改成http://127.0.0.1/Dedecms/ask/index.php才行....还有,这个时候返回首页,也无法显示了.....我在在apache的httpd.conf里设过DirectoryIndex,<IfModule mod_dir.c>
    DirectoryIndex index.html index.htm index.php index.php3
</IfModule>但不管用???还要设哪吗??
谢谢各位老师~~

解决方案 »

  1.   

    <Directory /xxx>
    DirectoryIndex index.html index.htm index.php index.php3 
    </Directory>
    或者虚拟主机的配置里加.
      

  2.   


    在apache的配置文件查找DirectoryIndex應該可以找到上面的行,加上後面的index.php index.php3 
      

  3.   

    apache配置文件:apache/conf/httpd.confDirectoryIndex index.php index.html index.htm index.php3 
    <IfModule mod_dir.c> 
    </IfModule>然后重启apache
      

  4.   

    除了你哪种方法,<VirtualHost *:80>
        DocumentRoot d:/web/root/
        ServerName l
        ErrorLog logs/l_error_log
        CustomLog logs/l-access_log common
        <Directory "d:/web/root/"> 
        Options Indexes FollowSymLinks 
        DirectoryIndex index.php
        AllowOverride All 
        Order allow,deny 
        Allow from all 
       </Directory> 
    </VirtualHost><Directory "d:/web/root/">
        Options Indexes MultiViews
        DirectoryIndex index.php
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
      

  5.   

    改过配置文件后记得重新启动apache
      

  6.   

    是不是apache1和apache2的配置不同呢????
      

  7.   

    你用了模板了没有?用了的话在你的虚拟主目录文件下建一个index.php,让它进行自动跳转~