News Pretty Url working but page not showed up

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Essie
Forum Members
Forum Members
Posts: 27
Joined: Sat Jan 21, 2006 8:13 pm

News Pretty Url working but page not showed up

Post by Essie »

i just upgraded cmsmadesimple to its latest version. but somehow the news module seo url are not working properly. i get the correct seo url but the link to the news won't show up on the page. instead, i get the server returning me the exact same previous url page.

for example, when you go to my website front page, and click on the the news link at the left hand column, I get weird seo url for the news. Example: http://localhost/?page=news/21/144.html instead of http://localhost/news/21/144.html

Also, the page won't direct to the details of the requested news.

In my root htaccess file, I added this code:

Code: Select all

Options +FollowSymLinks
RewriteEngine on

# 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]
RewriteRule ^index.php$        index.php
in my cmsmadesimple config.php, I've edited the following:

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'] = '.html';

#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'] = true;

#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';
I am not sure what I did wrong. I copied and followed the instructions as mentioned at the forum but cannot get the news module to work. Please help. Thanks.
[url=http://"http://feeds.feedburner.com/Vancouver_Psychics_Journey]A Vancouver Psychic's Journey Blog[/url]
JohnnyB
Dev Team Member
Dev Team Member
Posts: 729
Joined: Tue Nov 21, 2006 5:05 pm
Location: OH, USA

Re: News Pretty Url working but page not showed up

Post by JohnnyB »

I know this post is over a month old.. but,
It might be because you have both mod rewrite and pretty urls set to true.

$config['internal_pretty_urls'] = true;
This has to be false if using mod rewrite...
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Essie
Forum Members
Forum Members
Posts: 27
Joined: Sat Jan 21, 2006 8:13 pm

Re: News Pretty Url working but page not showed up

Post by Essie »

Thank you so much for responding to my inquiry. Even though it has been a month late response. I still never got to get the stuff working for me.

The pretty url link is not an issue. I've tried setting "false" for both internal pretty urls and use hierarchy and nothing works. I've tried Elijah Lofgren's news module with every step and nothing works for me.


It is alright to have both set "true". It is the news module itself not does not accept pretty url link. I think the news module itself must have some bug within the code. Otherwise, it does not make sense why it won't read the detail page when I click on the news link. I've already corrected the news id number ('returnid' => '')  in the
$this->RegisterRoute('/(?PNews)\/.*?\/.*\-(?P[0-9]+)$/', array('returnid'=>'178'));

But it still does not show the detail page of the news link.

Code: Select all

#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'] = true;

#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'] = false;
(should set to "false" to get it working)
But then I don't know how others managed to get their working just find using it. I don't know. The news module is buggy is all I can say.
Last edited by Essie on Sat Sep 08, 2007 4:53 am, edited 1 time in total.
[url=http://"http://feeds.feedburner.com/Vancouver_Psychics_Journey]A Vancouver Psychic's Journey Blog[/url]
Essie
Forum Members
Forum Members
Posts: 27
Joined: Sat Jan 21, 2006 8:13 pm

Re: News Pretty Url working but page not showed up

Post by Essie »

I give up trying to setting up an seo url friendly feature with the news module. It just does not work. Otherwise the rest of the web page seo url works fine.
[url=http://"http://feeds.feedburner.com/Vancouver_Psychics_Journey]A Vancouver Psychic's Journey Blog[/url]
Stringfellow
Forum Members
Forum Members
Posts: 26
Joined: Wed Mar 29, 2006 4:08 pm

Re: News Pretty Url working but page not showed up

Post by Stringfellow »

make sure you don't have a folder called "news" in your root. That whas my problem when pretty urls for news didn't work.
Essie
Forum Members
Forum Members
Posts: 27
Joined: Sat Jan 21, 2006 8:13 pm

Re: News Pretty Url working but page not showed up

Post by Essie »

Thanks. I did thought of that and corrected it a while ago to see if it would make any difference. The only news folder I have is what is already including in the news module.

But as I have noted, the pretty url would show up when I put the mouse over the news link under news summary. But when I click on the news link (which shows the pretty url), instead of me being redirected to a detailed news web page, I am redirected to a particular web page. It won't show dynamically the news detail according to its designated pretty url. That is why I say this module do not work for me.
[url=http://"http://feeds.feedburner.com/Vancouver_Psychics_Journey]A Vancouver Psychic's Journey Blog[/url]
Post Reply

Return to “Modules/Add-Ons”