Php 我上传我的新脚本到主机,但网站不工作主要错误错误错误太多重定向

Php 我上传我的新脚本到主机,但网站不工作主要错误错误错误太多重定向,php,web,hosting,htdocs,Php,Web,Hosting,Htdocs,.htaccess代码是 RewriteEngine off <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ public/ [L] RewriteRule ^(.*) public/$1 [L] </IfModule> 发动机关闭 重新启动发动机 重写规则^$public/[L] 重写规则^(.*)公共/$1[L] 问题是什么?我不太确定这是否是您想要做的,但请尝试以下方法

.htaccess代码是

RewriteEngine off

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ public/ [L]
    RewriteRule ^(.*) public/$1 [L]
 </IfModule>
发动机关闭
重新启动发动机
重写规则^$public/[L]
重写规则^(.*)公共/$1[L]

问题是什么?

我不太确定这是否是您想要做的,但请尝试以下方法:

RewriteEngine Off
<IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*)$ public/$1 [L,QSA]
</IfModule>
发动机关闭
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重新启动发动机
重写基/
重写规则^(.*)$public/$1[L,QSA]

请写下无法确定的问题标题您希望通过规则实现什么?网站未打开您可以查看主页,管理页面未打开也正在尝试,但无法正常工作您可以查看网站主页和管理页面您是否尝试过。htaccess我发送给您了?我是说,正是这样。