Page 1 of 1

Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Mon Nov 05, 2007 3:43 am
by unknown
...Or should I ask when will it be?
I have the following situation:
CMSMS 1.2
Apache 1.3.x
mod_rewrite
PHP-4.4.x
The need for CMSMS to present Human/SearchEngine readable/indexable URI's

After following all the information CMSMS provides - the last of which, located here:
http://wiki.cmsmadesimple.org/index.php ... retty_URLs

A trip to the home page results in a BLANK page, and the following error in the PHP error log:

Code: Select all

PHP Parse error:  syntax error, unexpected T_CLASS in /usr/local/www/CMSMS/lib/classes/contenttypes/Content.inc.php on line 4
Err... Ummm... That doesn't seem right. Was the "pretty_url" feature removed in 2.1?

Thank you for all your time and consideration in this matter.

P.S. Incase it's not evident, the document root and URL to the home page is: /
In other words, CMSMS is not in a sub directory.

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Mon Nov 05, 2007 6:38 am
by cyberman
CMSms has a built in SE/SF optimized algorithm - please look here

http://wiki.cmsmadesimple.org/index.php ... l_Settings

Have you tried that? Or what?

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Mon Nov 05, 2007 8:23 am
by unknown
Greetings, and thank you for your reply.
No, I didn't see that page. But other than suggesting that a "cache clearing" is required,
I was unable to discover anything different that the page I already indicated that I had read:
http://wiki.cmsmadesimple.org/index.php ... retty_URLs
had in it.

FWIW
config.php contains the following settings related to the issue:

Code: Select all

$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
mod_rewrite settings:

Code: Select all

RewriteBase /
#
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+).html$ index.php?page=$1 [QSA]
Using the following also failed:

Code: Select all

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?page=$1 [L,QSA]
In all cases, the cache was disabled to ensure I get immetiate, and accurate results.

But no matter what the setting for "pretty/readable" URL's, the home page is blank.
The blank page(s) did not occur until SEO/SEF  settings were attempted. And the
following error is repeated in the PHP error log:

Code: Select all

PHP Parse error:  syntax error, unexpected T_CLASS in /usr/local/www/CMSMS/lib/classes/contenttypes/Content.inc.php
OH, and yes, the {metadata} tag exists in the templates (default).

Thanks again for your reply.

P.S.
I can't help but notice that cmsmadesimple.org only uses v.1.1.1 & v1.1.2.
Maybe that should be my queue to not use 1.2, and use one of those versions instead.
No?

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Mon Nov 05, 2007 8:39 am
by RonnyK
I can't explain why the pretty URL's arent working for you. Others have far more experience with that.

Concerning your statement on cmsmadesimple.org not running against latest stable is the fact that at the moment changes are being made to the site. A new design has been choosen and is implemented, including some changes to the content of the site. Together with the new design will all be upgraded.

It's allways good to be on latest stable, 1.2 as we speak. For security-reasons f.e.

Ronny

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Mon Nov 05, 2007 8:59 am
by unknown
RonnyK wrote: Concerning your statement on cmsmadesimple.org not running against latest stable is the fact that at the moment changes are being made to the site. A new design has been choosen and is implemented, including some changes to the content of the site. Together with the new design will all be upgraded.

It's allways good to be on latest stable, 1.2 as we speak. For security-reasons f.e.
Hello, and thank you for your reply.
I see, well, that explains the version question. :)
Normally I would agree with your assertion regarding the latest version. But given my being
unable to get CMSMS to work in a way that actually makes it usable. I couldn't help but wonder
if the newest version still might need some more testing to ensure everything that worked in
previous version(s) still works in the newest version.

Anyway, thanks again for your thoughtful reply.

UPDATE:
I installed a copy of v.1.1.1 on one of my other servers. I used the following mod_rewrite rules:

Code: Select all

RewriteEngine On

#Rewrites page.shtml as index.php?page
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+).htm$ index.php?page=$1 [QSA]
and the following config.php rules:

Code: Select all

$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = false;
$config['query_var'] = 'page';
Which results in a 404 / Page (pagename.html) not found
pagename being whichever page name the link in the front page points to.
Does this provide any clues?

Thanks again.

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Mon Nov 05, 2007 11:51 am
by Pierre M.
Hello,

assumming

Code: Select all

$config['page_extension'] = '.html';
what about

Code: Select all

RewriteRule ^(.+)$ index.php?page=$1 [QSA]
I follow Cyberman and RonnyK : instructions on http://wiki.cmsmadesimple.org/index.php ... l_Settings should work out of the box. If not, please set up a rewritelog to debug.

Pierre M.

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Mon Nov 05, 2007 7:38 pm
by unknown
Hello, and thank you for your reply.
Pierre M. wrote: Hello,

assumming

Code: Select all

$config['page_extension'] = '.html';
what about

Code: Select all

RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Yes, I treid both of the suggested options in:
http://wiki.cmsmadesimple.org/index.php ... retty_URLs
and in:
http://wiki.cmsmadesimple.org/index.php ... l_Settings
Pierre M. wrote: I follow Cyberman and RonnyK : instructions on http://wiki.cmsmadesimple.org/index.php ... l_Settings should work out of the box.
Yes, I mentioned having read these in earlier posts.
Pierre M. wrote: If not, please set up a rewritelog to debug.

Pierre M.
How would you recommend setting up the rewritelog to get debug info?

Thank you again for your response.

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Wed Nov 07, 2007 6:20 pm
by Pierre M.

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Wed Nov 07, 2007 9:32 pm
by kermit
Those wikidocs are ancient (relatively speaking); pretty URLs is as easy as:

1. install cms made simple
2. edit config.php: assume_mod_rewrite to true
3. move doc/htaccess.txt to site root and rename to .htaccess

optional, enable use_hierarchy and set up a page_extension (there will be NONE if you leave it empty; if you want pages to end with '.html' then you must say so)

note you may need to clear the cache via the admin panel.


the URLs section of config.php will look something like this:

Code: Select all

#------------
#URL Settings
#------------

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '/';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = false;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

and .htaccess will contain:

Code: Select all


# Make sure you have Options FollowSymLinks
# and Allow on
RewriteEngine On

#Rewrites page.shtml as index.php?page
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
make sure all your paths and URLs are defined properly in config.php and {metadata} appears in the of your template.

Re: Why isn't CMSMS SE/SF Optimized/Friendly?

Posted: Wed Nov 07, 2007 9:38 pm
by tsw
kermit: mind copypasting that to wiki :)