News module not linking to articles

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
kirks
Forum Members
Forum Members
Posts: 14
Joined: Tue Aug 02, 2011 11:47 pm

News module not linking to articles

Post by kirks »

I'm not sure what happened although I think it has something to do with pretty urls but the news articles suddenly don't link from the summary links anymore.

Does anybody have any idea what I could have done to break it?

http://www.veritywebsvs.com/furnitureshowplace2/

CMS Version - 1.11.5
News module version - 2.12.12
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: News module not linking to articles

Post by velden »

I too believe it's because of the .htaccess file not properly configured as e.g. http://www.veritywebsvs.com/furnituresh ... eekend.htm does work.

RewriteBase in .htaccess configured correctly?

RewriteBase /furnitureshowplace2
kirks
Forum Members
Forum Members
Posts: 14
Joined: Tue Aug 02, 2011 11:47 pm

Re: News module not linking to articles

Post by kirks »

velden wrote:RewriteBase in .htaccess configured correctly?

RewriteBase /furnitureshowplace2

I don't know. I had a hard time trying to get pretty urls to work partly because the site is temporarily located under the root of a Wordpress site until it is published live. I don't know how to configure RewriteBase. Is there somewhere I can get instructions?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: News module not linking to articles

Post by velden »

kirks wrote:Is there somewhere I can get instructions?
Yes, it's default present in the htaccess.txt file in the /doc directory.
htaccess.txt is supposed to be copied to the cmsms root and renamed to .htaccess

Code: Select all

...
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /
...
kirks
Forum Members
Forum Members
Posts: 14
Joined: Tue Aug 02, 2011 11:47 pm

Re: News module not linking to articles

Post by kirks »

I did that. Here's my .htaccess file:

Code: Select all

# -- cmsms urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /furnitureshowplace2/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
# RewriteRule . index.php [L]
RewriteRule ^([^/]*)\.htm$ /furnitureshowplace2/index.php?page=$1 [L]
</IfModule>
# -- cmsms urls end --
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News module not linking to articles

Post by Dr.CSS »

You need to remove the / at the end, note how it is shown in the example...

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

RewriteBase /furnitureshowplace2/
kirks
Forum Members
Forum Members
Posts: 14
Joined: Tue Aug 02, 2011 11:47 pm

Re: News module not linking to articles

Post by kirks »

Dr.CSS wrote:You need to remove the / at the end, note how it is shown in the example...

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

RewriteBase /furnitureshowplace2/
Thanks. That makes sense and I tried that but no success with the news module.

ks
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: News module not linking to articles

Post by velden »

Try:

Code: Select all

RewriteRule ^(.+)\.htm$ /furnitureshowplace2/index.php?page=$1 [L]
I think if you edit the default files (like this .htaccess) you should exactly understand how it works...
kirks
Forum Members
Forum Members
Posts: 14
Joined: Tue Aug 02, 2011 11:47 pm

Re: News module not linking to articles

Post by kirks »

velden wrote:Try:

Code: Select all

RewriteRule ^(.+)\.htm$ /furnitureshowplace2/index.php?page=$1 [L]
I think if you edit the default files (like this .htaccess) you should exactly understand how it works...
You're right, I'm going to have to MAKE some time to learn this stuff.

Thanks, it works great now!
Post Reply

Return to “The Lounge”