Apache - 在某些情况下找不到url

时间:2015-09-07 11:22:15

标签: apache url rewrite

我在Ubuntu服务器上上传的Zend应用程序遇到了一些问题。虽然此类网址为http://www.domain.comhttp://www.domain.com/admin/panel,但只有这种类型的链接:http://www.domain.com/index/51-picture.html显示:Not found.The requested URL /index/51-picture.html was not found on this server.

的apache.conf

<Directory/>
        Options FollowSymLinks
        Allow from All
</Direcory>

<Directory /var/www/>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

位点可用/ domain.conf

<VirtualHost *:80>

        ServerAdmin admin@domain.com
        ServerName domain.com
        ServerAlias www.domain.com
        DocumentRoot /var/www/domain

        <Directory /var/www/domain/>
                Options FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

我还启用了:a2enmod rewrite

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

好的,我找到了解决方案。刚刚从域配置文件中删除了MultiViews。现在一切都很好。