How to make a clean RSS feed? [solved]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
presura
Forum Members
Forum Members
Posts: 20
Joined: Wed May 23, 2007 5:36 pm

How to make a clean RSS feed? [solved]

Post by presura »

After using {cms_module module='News' number='50' dateformat='%b %d, %Y' makerssbutton='true' category='stiri*' sortby='news_date'} , I have the XML button, but the RSS link it provides is not clean. It looks something like this:

http://www.stiinta.info/index.php?mact= ... eturnid=69

How can I have the XML at the location I want, let's say http://www.stiinta.info/RSS/rssfeed.xml ?
Thanks for any suggestion!
Cristian
Last edited by presura on Fri Feb 13, 2009 11:20 am, edited 1 time in total.
Pierre M.

Re: How do make a clean RSS feed?

Post by Pierre M. »

Hello,

You are right, it would be much better to have this nice myrssfeed.xml URL.
Why not try with the webserver URL rewritting abilities ? Do you know URL rewritting ?

Pierre M.
presura
Forum Members
Forum Members
Posts: 20
Joined: Wed May 23, 2007 5:36 pm

Re: How do make a clean RSS feed?

Post by presura »

Thanks for the suggestion.
I do not know about URL rewriting capabillities, but I will have a look to what it is, and maybe give it a try!
cristian
presura
Forum Members
Forum Members
Posts: 20
Joined: Wed May 23, 2007 5:36 pm

Re: How do make a clean RSS feed?

Post by presura »

I tried, but it goes beyond me...
I did, however cleaned the URL's in this way...
Is there a simple way to add a line in .htaccess which takes the ugly name and puts the one I want?
Something like RewriteRule uglyfile nicefile ?
thanks,
cristian
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm
Location: Finland

Re: How do make a clean RSS feed?

Post by tsw »

add something like this in your .htaccess file

RewriteRule ^clean.xml$ index.php?mact=News,cntnt01,rss&cntnt01showtemplate=false&cntnt01category=&c\
ntnt01number=20&cntnt01returnid=15


before rewritecond clauses. (check your url from the rss feed first)

this is not the optimal solution and wont probably work in every installation :)
presura
Forum Members
Forum Members
Posts: 20
Joined: Wed May 23, 2007 5:36 pm

Re: How do make a clean RSS feed?

Post by presura »

Thanks for the suggestion, but it did not work... I tried also some generators from the web, but the same negative result...
cristian
Pierre M.

Re: How do make a clean RSS feed?

Post by Pierre M. »

Hello cristian,
presura wrote: I tried, but it goes beyond me...
Thank you for searching, reading the doc and trying by yourself.
presura wrote: Something like RewriteRule uglyfile nicefile ?
Just the opposite, as tsw has suggested :
RewriteRule NiceExternalURL uglyinternalhack
(beware there are only 3 "words" and 2 spaces).

May be you should first try with a simple case {cms_module module='News' number='50' makerssbutton='true'} have a nice URL for it and then go for your complex case {cms_module module='News' number='50' dateformat='%b %d, %Y' makerssbutton='true' category='stiri*' sortby='news_date'} ?

BTW, with only internal pretty URLs ON (no .htaccess), my RSS URL is /news/rss. And tsw suggestion apply :
RewriteRule ^/RSS/rssfeed\.xml$ /news/rss

The rewrite rule should be after "rewriteengine on" but before other rewrite things. And may be with some [L] mark...
Do you have internal pretty URLs on or off ?
Do you have external pretty URLs on or off ?
What is your main URL ? (/index.php, /, /folder/index.php...)
Could you show us an extract of your config.php (fragment about URLs) and an extract of .htaccess ?
Where is your .htaccess ?

Pierre M.
presura
Forum Members
Forum Members
Posts: 20
Joined: Wed May 23, 2007 5:36 pm

Re: How do make a clean RSS feed?

Post by presura »

Just to remind me ( ;D)
I made a file generate-feeds.pl in the public_html/cgi-bin
The content is:

#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);

#!/usr/bin/perl

use LWP::Simple qw(getstore);

getstore( "http://www.stiinta.info/index.php?mact= ... eturnid=52", "/home/stiinta/www/RSS/rssfeed.xml" );
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: How do make a clean RSS feed?

Post by Dr.CSS »

So did you fix it?...
presura
Forum Members
Forum Members
Posts: 20
Joined: Wed May 23, 2007 5:36 pm

Re: How do make a clean RSS feed?

Post by presura »

Yes.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: How do make a clean RSS feed?

Post by Russ »

I'm sure I just used the httaccess/friendly URL'S for CMSMS (as in documentation) and got them automatically in my RSS feed from news...

http://www.friendsofthejohnrylands.org/news/
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: How do make a clean RSS feed?

Post by Dr.CSS »

@presura

Then please to add [solved] to subject line in first post...
Post Reply

Return to “Layout and Design (CSS & HTML)”