News + mod_rewrite. Getting URL in required search engine friendly format

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.
Locked
logout

News + mod_rewrite. Getting URL in required search engine friendly format

Post by logout »

Hello everyone.

I am new to CMSMS but so far I LOVE IT.
I am moving the existing site to a CMSMS and having some troubles with getting search engine friendly URLS for the news section.

I desperately need your help!

I am using:
CMS Made Simple 1.0.2 "Maui"
News 2.1
Apache 2.0
PHP 4.4.2
MySQL 4.1.18
ModRewrite is ON

config.php settings:

Code: Select all

$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.cfm';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = false;
however I added:

Code: Select all

$config['use_hierarchy'] = true;
to the beginning of News.module.php and action.default.php

My .htaccess file look like this:

Code: Select all

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
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 [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
That way I got all my content pages URLs of the website to match the existing website so when I switch my search engine ranking won't be lost.
The news pages however, are exactly how they expected to be ( /news/14/63.cfm ) , but not how I need them (and it is a MUST, my head is spinning, and I can't make it work!!! help!).

So I found this topic:
http://forum.cmsmadesimple.org/index.ph ... 012.0.html
This solution should have provided me with acceptable results.
However, it just didn't work. It displayed the link structure in the format it acceptable, but news details page never showed up. Instead it troughs the browser back to either home page or the news list page.

The desired URL structure is:
http://www.balh.com/whatever/title-of-the-news.cfm
or
http://www.balh.com/whatever/00/00/titl ... e-news.cfm
or something along this lines...

The most important part is to have lower case dash separated /title-of-the-news-article.cfm at the end of URL, and preferably as little as possible directory inclusions (ie /00/00/00/...)

I am suspecting that it is the mod_rewrite issue. But I am clueless how to fix it up.
I've been on it for 4 days and I am so lost. It is crucial to have the URLs this way for Search Engine Optimization purposes.
Can someone please help me?

You can view the development site at: http://www.asfdesign.com/home-test.cfm

Thank you!

Dmitri
ASF Design Inc : Search Engine Optimization and Search Engine Marketing firm
Last edited by logout on Mon Nov 06, 2006 3:04 am, edited 1 time in total.
Pierre M.

Re: News + mod_rewrite. Getting URL in required search engine friendly format

Post by Pierre M. »

Are you trolling or advertising ?
Your link shows your expected result.
PM
logout

Re: News + mod_rewrite. Getting URL in required search engine friendly format

Post by logout »

Actually - neither.

I waited for few days for anyone to reply and since I couldn't get anywhere I just manually posted the content where news should be. Sort of a desperate measure since the site needs to be released ASAP.

the actual page where you can see my attempts to make it work is now here: http://www.asfdesign.com/home-test.cfm at the bottom section of the page.

I have updated the link in my first post as well.

So yeah, the question is still not answered. Please help! I would like to use news module for articles vs. posting whole sha-bang manually :(

Thanks!
Last edited by logout on Mon Nov 06, 2006 3:05 am, edited 1 time in total.
Pierre M.

Re: News + mod_rewrite. Getting URL in required search engine friendly format

Post by Pierre M. »

logout wrote: (snip) So I found this topic:
http://forum.cmsmadesimple.org/index.ph ... 012.0.html
This solution should have provided me with acceptable results.
However, it just didn't work. It displayed the link structure in the format it acceptable, but news details page never showed up. Instead it troughs the browser back to either home page or the news list page. (snip)
This topic seems to be a good one related to your need. And it says the work is stopped half the way (list page ok, details page ko). We can only hope that a dev resumes it to achieve the other half. Or may be a new dev, that is why free software is hopefull.

Coders, please help fixing this : I'm sure Dmitri's corporation would advocate CMSms if all of its URLs provided good ranking.

PM
logout

Re: News + mod_rewrite. Getting URL in required search engine friendly format

Post by logout »

Pierre M. wrote: Coders, please help fixing this : I'm sure Dmitri's corporation would advocate CMSms if all of its URLs provided good ranking.
Absolutely. Whether this is fixed or not, the plan is to use the CMSMS as a the CMS of choice for smaller size projects for all clients.
in terms of SEO it is the best free out of the box solution I came across. Still many things to work on to make it even better in terms of SEO, but hey! Comparing hundresd of other CMS in all price ranges it is one of the best.

I am very sure we will be hiring soon to create custom mods for it.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: News + mod_rewrite. Getting URL in required search engine friendly format

Post by tsw »

there are some problems with modules and modrewrite urls.

module needs to know its own information plus where to go back in the site if needed, as you can see in the other thread modrewrite version is almost longer than normal ;)

I think we could add it as a option tho... news module needs other stuff also (like images assigned to news items and categories)...
logout

Re: News + mod_rewrite. Getting URL in required search engine friendly format

Post by logout »

tsw wrote: there are some problems with modules and modrewrite urls.

module needs to know its own information plus where to go back in the site if needed, as you can see in the other thread modrewrite version is almost longer than normal ;)
I was thinking that using

Code: Select all

$config['use_hierarchy'] = true;
the only information that being passed onto a script is category id and news article id.
I guess if the information can be encoded in URL in this format:
/title-of-the-article-00-00.cfm
or worst case scenario
/00/00/title-of-the-article.cfm

Would not it work that way without heavily getting into module logic modifications?
Locked

Return to “CMSMS Core”