I am trying to install CI under a directory which is also on a subdomain. So my base url would look like http://subdomain.domain.com/ci/
The following htaccess works fine on root of domain but not on directory, the browser says there is a redirect loop error.
Here is my code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^sub\.domain\.com/ci/$
RewriteRule ^(.*)$ http://sub.domain.com/ci/$1 [L,R=301]
RewriteCond $1 !^(index\.php|assets)
RewriteRule ^(.*)$ /index.php?/$1 [L]
I am not very skilled with mod rewrite, any help would be appreciated! Thank you!
Inside your /ci directory your htaccess should be as follows
Based on your above comments that should be sufficient