当我在cpanel中上传php项目时,出现此错误。我的.htaccess
文件具有以下代码:
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine on
#uncomment next line if silex app root is in a mamp subdirectory
RewriteBase /TeraaketService
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
我是php新手,如何解决此问题?
答案 0 :(得分:0)
将其替换为您的.htaccess文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /*your_project_name/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
或
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>