Why I am getting 'Forbidden' when I try to login on my live codeigniter site?

╄→尐↘猪︶ㄣ 提交于 2020-01-04 06:27:34

问题


#Deny from all
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|assets|images|upload|uploads|html|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

This is my current .htaccess file and site is inside a sub-domain directory called clients. You can access the site here: http://clients.creditblitz.ca/


回答1:


Your given url is redirect to 404 page

http://clients.creditblitz.ca/authenticate

But access below url redirect to 200 response

http://clients.creditblitz.ca/index.php/authenticate

So, Please remove the index.php in codeIgniter Framework config file

$config['index_page'] = '';

And apply below htaccess coding

RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|css|images|robots\.txt)
RewriteRule .* index.php/$0 [PT,L]


来源:https://stackoverflow.com/questions/34558176/why-i-am-getting-forbidden-when-i-try-to-login-on-my-live-codeigniter-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!