FYI...Domain redirect to subfolder...
Permalink
Ok, I thought I would share some insight. I recently had a 5.3.1.1 install that was working just fine using an .htaccess redirect to a sub-folder with my host. This was simply a preference thing so I didn't have a cluttered up server. It took a bit of messing around but I got it to work using this code:
At this point everything seemed fine. And as far as the site front end, it was.
However, the reason I am writing this post is a forewarning because the back end admin results in some major problems that at first I thought were bugs until I decided on a hunch to move my C5 install back to my domain root /.
1) A lot of css issues between different browser types when navigating admin screens, pop-ups, etc.
2) Could not edit pages, sometimes would result in logging me out, and if that didn't happen, I would get access denied when choosing to edit a block.
3) I could add a page but could not add any blocks. Result was blank pop-up.
4) Once a page was in edit mode, none of the upper admin bar options worked except the dashboard link. I had to go to sitemap, then choose versions and remove the un-edited version from there.
All in all, It's too much hassle to figure out where the problem is and I just put my site back to the root domain.
Hope this saves someone a lot of time.
Cheers!
RewriteEngine on RewriteCond %{HTTP_HOST} ^(http://www.)?mywebsite.com$ RewriteCond %{REQUEST_URI} !^/subfolder/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /subfolder/$1 RewriteCond %{HTTP_HOST} ^(http://www.)?mywebsite.com$ RewriteRule ^(/)?$ subfolder/index.php/$1 [L]
At this point everything seemed fine. And as far as the site front end, it was.
However, the reason I am writing this post is a forewarning because the back end admin results in some major problems that at first I thought were bugs until I decided on a hunch to move my C5 install back to my domain root /.
1) A lot of css issues between different browser types when navigating admin screens, pop-ups, etc.
2) Could not edit pages, sometimes would result in logging me out, and if that didn't happen, I would get access denied when choosing to edit a block.
3) I could add a page but could not add any blocks. Result was blank pop-up.
4) Once a page was in edit mode, none of the upper admin bar options worked except the dashboard link. I had to go to sitemap, then choose versions and remove the un-edited version from there.
All in all, It's too much hassle to figure out where the problem is and I just put my site back to the root domain.
Hope this saves someone a lot of time.
Cheers!
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(http://www.)?orangecountypool.net$
RewriteCond %{REQUEST_URI} !^/base/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /base/$1
RewriteCond %{HTTP_HOST} ^(http://www.)?orangecountypool.net$
RewriteRule ^(/)?$ base/index.php/$1 [L]
(if you want to give this a shot, remove trailing ... from lines above and add these to your .htaccess file in your root domain folder, just modify the domain name and the folder name)