问题
#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