繁体   English   中英

Ubuntu Apache给出404错误,但index.php显示网站CSS

[英]Ubuntu Apache gives 404 error but index.php shows site css

我正在ubuntu 18.04本地主机上的子目录中设置一个应用程序,因此url如下所示:本地主机/应用程序名称。 问题是我不断收到apache 404错误。 我觉得我已经尝试了default.conf和.htaccess之间的所有内容。 从好的方面来说,如果我输入/index.php,它至少会给我一个来自网站本身网站CSS的404页面错误。 这是我的default.conf和.htaccess 文件,或者它是在litten框架上编写的,它的价值是什么

DocumentRoot /var/www/html/app-name/


<Directory /var/www/html>
AllowOverride All
</Directory>

<Directory /var/www/html/eduTrac-SIS/>
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php
RewriteBase /app-name
AllowOverride All
Order allow,deny
allow from all
</Directory>

的.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /var/www/html/app-name/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

所以我知道了。 我也忽略了default.conf的所有其他功能,并让.htaccess做到了这一点以及框架内的其他更改。 全部解决了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM