Page 1 of 1
How to make a clean RSS feed? [solved]
Posted: Wed May 23, 2007 5:45 pm
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
Re: How do make a clean RSS feed?
Posted: Thu May 24, 2007 2:12 pm
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.
Re: How do make a clean RSS feed?
Posted: Thu May 24, 2007 7:56 pm
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
Re: How do make a clean RSS feed?
Posted: Thu May 24, 2007 9:34 pm
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
Re: How do make a clean RSS feed?
Posted: Fri May 25, 2007 9:18 am
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

Re: How do make a clean RSS feed?
Posted: Fri May 25, 2007 10:35 am
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
Re: How do make a clean RSS feed?
Posted: Fri May 25, 2007 2:47 pm
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.
Re: How do make a clean RSS feed?
Posted: Mon Aug 18, 2008 6:07 pm
by presura
Just to remind me (

)
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" );
Re: How do make a clean RSS feed?
Posted: Mon Aug 18, 2008 7:39 pm
by Dr.CSS
So did you fix it?...
Re: How do make a clean RSS feed?
Posted: Tue Sep 16, 2008 9:51 pm
by presura
Yes.
Re: How do make a clean RSS feed?
Posted: Wed Sep 17, 2008 12:05 pm
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/
Re: How do make a clean RSS feed?
Posted: Sat Sep 20, 2008 6:47 pm
by Dr.CSS
@presura
Then please to add [solved] to subject line in first post...