Why I am getting 'Forbidden' when I try to

2019-07-09 03:35发布

#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条回答
地球回转人心会变
2楼-- · 2019-07-09 04:27

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]
查看更多
登录 后发表回答