#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]
这是我当前的.htaccess文件,站点位于名为clients的子域目录中。您可以在此处访问该网站:http://clients.creditblitz.ca/
答案 0 :(得分:1)
您的指定网址将重定向到404页
http://clients.creditblitz.ca/authenticate
但访问以下网址重定向到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 $1 !^(index\.php|css|images|robots\.txt)
RewriteRule .* index.php/$0 [PT,L]