当我尝试登录我的实时 codeigniter 网站时,为什么我得到 'Forbidden'?
Why I am getting 'Forbidden' when I try to login on my live codeigniter site?
#Deny from all
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond !^(index\.php|assets|images|upload|uploads|html|robots\.txt)
RewriteRule ^(.*)$ index.php/ [L]
这是我当前的 .htaccess 文件,站点位于名为 clients 的子域目录中。您可以在此处访问该站点:http://clients.creditblitz.ca/
您给定的 url 被重定向到 404 页面
http://clients.creditblitz.ca/authenticate
但下面的访问 url 重定向到 200 响应
http://clients.creditblitz.ca/index.php/authenticate
所以,请删除 codeIgniter Framework 配置文件中的 index.php
$config['index_page'] = '';
并应用下面的htaccess编码
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond !^(index\.php|css|images|robots\.txt)
RewriteRule .* index.php/[=11=] [PT,L]
#Deny from all
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond !^(index\.php|assets|images|upload|uploads|html|robots\.txt)
RewriteRule ^(.*)$ index.php/ [L]
这是我当前的 .htaccess 文件,站点位于名为 clients 的子域目录中。您可以在此处访问该站点:http://clients.creditblitz.ca/
您给定的 url 被重定向到 404 页面
http://clients.creditblitz.ca/authenticate
但下面的访问 url 重定向到 200 响应
http://clients.creditblitz.ca/index.php/authenticate
所以,请删除 codeIgniter Framework 配置文件中的 index.php
$config['index_page'] = '';
并应用下面的htaccess编码
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond !^(index\.php|css|images|robots\.txt)
RewriteRule .* index.php/[=11=] [PT,L]