News Pretty Url working but page not showed up
Posted: Sat Jul 28, 2007 3:20 am
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:
in my cmsmadesimple config.php, I've edited the following:
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.
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
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';