[SOLVED] Trying to install CMSMS to a sub-folder
[SOLVED] Trying to install CMSMS to a sub-folder
Hi all.
I am trying to install CMSMS to a subfolder on a server where there is already a CMSMS installtion in the root dircetory. Is this possible?
CMSMS version 1.11.7
Domain: http://www.modh.co.za
Trying to install another instance in http://www.modh.co.za/test
After that i will use the subdomain http://test.modh.co.za that points to the test folder.
I hastily slapped an under construction page on there, but ignore that. Looking at the /test path we see that the URL of the CSS is wrong.
Any idea why?
I am trying to install CMSMS to a subfolder on a server where there is already a CMSMS installtion in the root dircetory. Is this possible?
CMSMS version 1.11.7
Domain: http://www.modh.co.za
Trying to install another instance in http://www.modh.co.za/test
After that i will use the subdomain http://test.modh.co.za that points to the test folder.
I hastily slapped an under construction page on there, but ignore that. Looking at the /test path we see that the URL of the CSS is wrong.
Any idea why?
Last edited by wmdvanzyl on Wed Jul 31, 2013 8:37 pm, edited 1 time in total.
Re: Trying to install CMSMS to a sub-folder
You have something strange going on with your canonical settings or something as it gives double web address to links...
<link rel="canonical" href="www.modh.co.za/test/" />
<title>Home | CMS Made Simple Test Site</title>
<base href="www.modh.co.za/test/" />
http://www.modh.co.za/test/www.modh.co. ... msms-works
<link rel="canonical" href="www.modh.co.za/test/" />
<title>Home | CMS Made Simple Test Site</title>
<base href="www.modh.co.za/test/" />
http://www.modh.co.za/test/www.modh.co. ... msms-works
Re: Trying to install CMSMS to a sub-folder
I've sometimes issues too on specific hosting using subdomains.
In this case I'd suggest setting the root_url in config.php
$config['root_url'] = 'http://test.modh.co.za/';
The url's in your pages' source bare the 'http://' part. I think you might have used the config line, but forgot the protocol part (http://).
In this case I'd suggest setting the root_url in config.php
$config['root_url'] = 'http://test.modh.co.za/';
The url's in your pages' source bare the 'http://' part. I think you might have used the config line, but forgot the protocol part (http://).
Re: Trying to install CMSMS to a sub-folder
Will investigate - thanks!
Re: Trying to install CMSMS to a sub-folder
Well that helped! Let me see what works now and what doesn't. Not perfect yet, but clearly made a difference. Is this just related to installations in subdirectories?velden wrote:I've sometimes issues too on specific hosting using subdomains.
In this case I'd suggest setting the root_url in config.php
$config['root_url'] = 'http://test.modh.co.za/';
The url's in your pages' source bare the 'http://' part. I think you might have used the config line, but forgot the protocol part (http://).
Re: Trying to install CMSMS to a sub-folder
Most of the times it seems to work. I guess it depends on the way the hosting provider sets things up regarding sub domains.
Most of the times it works out of the box (without adding the root_url in config).
Are you sure you added: http://test.modh.co.za/ because it seems like http://www.modh.co.za/test
Most of the times it works out of the box (without adding the root_url in config).
Are you sure you added: http://test.modh.co.za/ because it seems like http://www.modh.co.za/test
Re: Trying to install CMSMS to a sub-folder
Well right now i am just trying to get it to work on http://www.modh.co.za/test - one problem at a time right. Will try and get the subdomain element of it solved later. ATM using that subfolder still gives me issues. The css is correctly found now, but none of the images are resolving. I have checked the paths using firebug and the paths are correct! So it could be a permissions thing? I dunno...velden wrote:Most of the times it seems to work. I guess it depends on the way the hosting provider sets things up regarding sub domains.
Most of the times it works out of the box (without adding the root_url in config).
Are you sure you added: http://test.modh.co.za/ because it seems like http://www.modh.co.za/test
EDIT: I've gone ahead and set up a subdomain and i get exactly the same result. Changed config.php to test.modh.co.za
EDIT: I do see however that using the root_url path test.modh.co.za/ gives a better result, but causes the path to read test.modh.co.za// This might have something to do with images not loading... For instance: trying to access test.modh.co.za/admin redirects to test.modh.co.za//admin/login.php
Last edited by wmdvanzyl on Wed Jul 31, 2013 9:11 am, edited 1 time in total.
Re: Trying to install CMSMS to a sub-folder
When changing things like that first clear cache: Admin -> System Maintenance I think.
The permissions (403 error) I don't understand. Maybe ask your hosting provider?
The permissions (403 error) I don't understand. Maybe ask your hosting provider?
Re: Trying to install CMSMS to a sub-folder
I no longer think it is a permissions issue. It is simply a slash being added somewhere. I can even access the backend now. I logged in and lceared the cache just in case.velden wrote:When changing things like that first clear cache: Admin -> System Maintenance I think.
The permissions (403 error) I don't understand. Maybe ask your hosting provider?
Trying to access
Code: Select all
test.modh.co.za/admin
Code: Select all
test.modh.co.za//admin/login.php
EDIT: Back to square one. Removed trailing slash from root_url and resolved double slashes situation. Still no images.
Re: Trying to install CMSMS to a sub-folder
I'm sorry about the trailing slash in root_url config. Copy-pasted it from my browser.
All the images give a http error 403 Forbidden.
I don't know where that comes from. Never had it myself, so I guess it's something host-specific.
You haven't been playing around with .htaccess files?
All the images give a http error 403 Forbidden.
I don't know where that comes from. Never had it myself, so I guess it's something host-specific.
You haven't been playing around with .htaccess files?
Re: Trying to install CMSMS to a sub-folder
Oh i understand now what you mean with the 403 error. Well at least we have an handle on what the problem is. I have just disallowed indexing of the directory, but that shouldn't do anything. Hold on - let me check the .htaccess of the root. I remember doing stuff in there a while back...
EDIT: You sir are a gentleman! I completely forgot of .htaccess file in the root directory. Had this in there:
Any guesses why the images wouldn't show?!
Commented it out, works like a charm. 
EDIT: You sir are a gentleman! I completely forgot of .htaccess file in the root directory. Had this in there:
Code: Select all
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://modh.co.za/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://modh.co.za$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.modh.co.za/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.modh.co.za$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

