[solved] :) Can't get site to work in root directory - htaccess issue?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
chrisbt
Dev Team Member
Dev Team Member
Posts: 180
Joined: Sun Sep 05, 2010 6:11 am
Location: Sheffield, UK

[solved] :) Can't get site to work in root directory - htaccess issue?

Post by chrisbt »

My fab new CMSMS (which is brilliant) site is working perfectly in the subdirectory www.mysite.com/kbcms/ but I just can't get it to load at www.mysite.com. I am fairly sure that it is a problem with my .htaccess file but I just don't know what. I searched through the help and the forum site and just can't find what may be wrong. I would so love some help it as I am about to pull my hair out.

I have the following .htaccess file loaded in the root directory (/public_html) and when I delete the old static files from that directory I just get the following error message: 'Oops! This link appears to be broken.'

Code: Select all

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
#Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /kbcms/

#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
I am guessing that the problem is with the .htaccess file or with the server not processing it. But this is all very new to me and I just don't know where to go next for a solution.

I'm running CMS Made Simple 1.8.2.  I'm using PHP 5.2.14, and MySQL 5.1.48-log. This is all working with Apache 2.2.16.  

Many thanks for help from anyone. I have solved many problems I've had reading this forum but can't seem to fathom this one. (Everyday is just one big learning experience - I would just like to be able to sleep again some time soon!)
Last edited by chrisbt on Sun Sep 19, 2010 3:17 pm, edited 1 time in total.
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Can't get site to work in root directory - htaccess issue?

Post by staartmees »

when I go to http://www.mysite.com/kbcms/ I get Page Not Found - 404 Error Page
The page you are looking for (http://mysite.com/kbcms/) is not here.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can't get site to work in root directory - htaccess issue?

Post by Rolf »

Hi chrisbt, welcome here

Change this

Code: Select all

#Sub-dir e.g: /cmsms
RewriteBase /kbcms/
Into

Code: Select all

#Sub-dir e.g: /cmsms
RewriteBase /
Grtz. Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
chrisbt
Dev Team Member
Dev Team Member
Posts: 180
Joined: Sun Sep 05, 2010 6:11 am
Location: Sheffield, UK

Re: Can't get site to work in root directory - htaccess issue?

Post by chrisbt »

Hi Rolf,

I now get a '403 Forbidden' error?

Thanks

Chris
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can't get site to work in root directory - htaccess issue?

Post by Rolf »

Can you pm me a url to your site?

By the way, you did change al the server paths in the config.php after moving the website??

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can't get site to work in root directory - htaccess issue?

Post by Rolf »

Ahh, should be
#Document root as seen from the webserver.  No slash at the end
#If page is requested with https use https as root url
#e.g. http://blah.com
$config['root_url'] = 'http://www.***.co.uk/kbcms';

#SSL URL.  This is used for pages that are marked as secure.
$config['ssl_url'] = 'https://www.***.co.uk/kbcms';

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/home/***/public_html/kbcms';
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
chrisbt
Dev Team Member
Dev Team Member
Posts: 180
Joined: Sun Sep 05, 2010 6:11 am
Location: Sheffield, UK

Re: Can't get site to work in root directory - htaccess issue?

Post by chrisbt »

Thanks Rolf. I think we are moving forward.

When I try the site page /index.html I now get the following error 'Fatal error: Class 'CmsRegularTaskHandler' not found in /home/XXXXXXX/public_html/kbcms/include.php on line 284'

Are there some other locations I need to change?

Also the www.mysite.co.uk location is still giving a 403 error.

Thanks

Chris
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can't get site to work in root directory - htaccess issue?

Post by Rolf »

I still get your old homepage over here...

You did copy all the files from the folder kbcms to the root of the website?
And you did change the config.php over here?
And you changed the .htaccess file like I said above?
And renamed the old index.html?
...  :-\

®
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
chrisbt
Dev Team Member
Dev Team Member
Posts: 180
Joined: Sun Sep 05, 2010 6:11 am
Location: Sheffield, UK

Re: Can't get site to work in root directory - htaccess issue?

Post by chrisbt »

Rolf,

Many, many thanks. All solved now. Beginners mistakes really. Thanks for your patience and your understanding that enables you to politely point out the obvious. I really appreciate the support. Now just looking forward to sleeping again.
;D

Chris
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can't get site to work in root directory - htaccess issue?

Post by Rolf »

chrisbt wrote: Many, many thanks. All solved now. Beginners mistakes really. Thanks for your patience and your understanding that enables you to politely point out the obvious. I really appreciate the support.
No problem, chrisbt
But for a 'beginner', you create nice websites :) Hope to see it in our CMS Show Off board soon.

®olf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “CMSMS Core”