How to make a clean RSS feed? [solved]
How to make a clean RSS feed? [solved]
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
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.
Re: How do make a clean RSS feed?
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.
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?
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
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?
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
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?
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
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?
Thanks for the suggestion, but it did not work... I tried also some generators from the web, but the same negative result...
cristian
cristian
Re: How do make a clean RSS feed?
Hello cristian,
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.
Thank you for searching, reading the doc and trying by yourself.presura wrote: I tried, but it goes beyond me...
Just the opposite, as tsw has suggested :presura wrote: Something like RewriteRule uglyfile nicefile ?
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?
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" );

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?
So did you fix it?...
Re: How do make a clean RSS feed?
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/
http://www.friendsofthejohnrylands.org/news/
Re: How do make a clean RSS feed?
@presura
Then please to add [solved] to subject line in first post...
Then please to add [solved] to subject line in first post...