我正在尝试在本地Apache服务器上开始使用PHP Webapp(由其他人编写)。每次我尝试打开项目文件夹中的任何.php文件时,都会收到错误404。
我通过打开其他项目中的其他php文件来检查服务器是否在工作,那里没有问题。在研究了可能的原因之后,我怀疑它可能是.htaccess
文件,但是我不确定具体的问题是什么。该文件中的代码如下:
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
<IfModule mod_rewrite.c>
Options +FollowSymlinks
Options -Multiviews
RewriteEngine On
RewriteBase /
RewriteRule ^cache/(.*)/images/(.*) /images/$2 [L]
RewriteRule ^cache/(.*)/fonts/(.*) /fonts/$2 [L]
RewriteRule ^(sitemap.xml|sitemap_xml/*) - [L]
RewriteRule ^(robots.txt|robots_txt/*) - [L]
RewriteRule ^(sitemap.php|sitemap.php/*) - [L]
RewriteRule ^(sitemap-dom.php|sitemap-dom.php/*) - [L]
RewriteRule ^about-us /cms/view/about-us/1
RewriteRule ^contact-us /cms/view/contact-us/24
RewriteRule ^privacy-policy /cms/view/privacy-policy/21
RewriteRule ^terms-and-conditions /cms/view/terms-and-conditions/20
RewriteRule ^how-it-works /cms/view/how-it-works/18
RewriteRule ^faq /cms/faq
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L,QSA]
</IfModule>
这是否限制了对项目目录中文件的任何访问?
我刚刚开始使用它,因此,您所能提供的任何帮助将不胜感激。