I am deploying a codeigniter app onto a subdomain which is hosted by a 3rd party apache server. When accessing the page it constantly refreshes and then the browser tells me there is a Redirect Loop occurring. I know it has to do with the Apache conf settings and the custom .htaccess file I use but I have no idea how to fix it.
Current .htaccess code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
Try another .htaccess
:
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
if not - try changing the last line to
RewriteRule ^(.*)$ /index.php/$1 [L]
Also make sure you've set $config['index_page']
in config.php to ''
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.