There are SO many questions on this I know, but there always seems to be a lack of complete understanding on my part about htaccess files. My file is really simple (taken from Bluehost as with other projects):
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.)?theglobalhuman.com$
RewriteCond %{REQUEST_URI} !^/www/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /www/$1
My folder structure (in a nutshell) is:
root
|-- app
|--templates
|-- admin
|-- public
|-- tmp
|-- www
|-- .htaccess
Where www
has the index file.
So if I go to website.com
, things are fine.
If I go to website.com/something/more
, that works fine, which hits the templates/public
folder.
However, if I go to website.com/admin/more
, which goes to the templates/admin
folder, for some reason the htaccess breaks and inserts www into the url. Has anyone ever has this problem?