image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old May 3rd, 2008, 02:27 PM
zynizen's Avatar
Registered User
 
Join Date: Sep 2006
Posts: 216
zynizen is on a distinguished road
Question RSS linking question/filenames

I was wondering, if I don't want to use feedburner to publish RSS because the feed looks like crap (all that free advertising etc, its too hard for readers of my site to comprehend whats on the screen)

I've created an xml file and validated it properly etc.
I created a subdomain called: http://rss.mydomainhere.com

and the only file I have inside that folder is my "feed.xml" file.
How do I get around typing in the actual xml filename to view my feed?

I just want the above website address to view my feed like the rest of the world seems to know how to do.. am I missing something?

Also, is there any way to add good analytics to track feeds? I know google just bought out feedburner but, until then and until improvements come up, I just want simple access via the url above.

Thanks a lot!
Reply With Quote
  #2  
Old May 4th, 2008, 07:10 AM
Captain Code's Avatar
Moderator
 
Join Date: Aug 2001
Location: Ontario, Canada
Posts: 3,085
Captain Code will become famous soon enough
You can do it easily through an http redirect as long as you have the ability from your host to use .htaccess files.
Create a file called .htaccess at the root directory for that sub domain.
In your .htaccess file put this code
Code:
Redirect 301 /index.html http://rss.mydomainhere.com/rssfile.xml
All web browsers when going to a URL that does not specify a file like rss.mydomain.com/page.html will send an http request for index.html or index.php. You can capture this with the .htaccess file and redirect them by giving the http 301 response code.

Alternatively if you don't have .htaccess because your host doesn't allow it, you can use php to set the header. Create a file called index.php and put this in it:
Code:
header("Location: /rssfile.xml",TRUE,301);
You can also do
Code:
header("Location: /rssfile.xml");
but setting the 301 http code will be more useful because search engines will remember it. The 301 code tells browsers and search engines that your page has moved permanently and the search engine should update it's index to directly point to the xml file in the future.
__________________
MacBook Pro 2.16GHz Core2Duo 3GB RAM, G4 1.4GHz OSX Tiger 1.25GB RAM, Dual 2GHz G5 OSX Tiger 2GB RAM (freakin shweet)
Athlon 64 Windoze XP for school work (programming) 1GB RAM
dferns@macosx.com
Reply With Quote
  #3  
Old May 5th, 2008, 07:27 AM
zynizen's Avatar
Registered User
 
Join Date: Sep 2006
Posts: 216
zynizen is on a distinguished road
Thank you so much for this detailed description! I really appreciate it!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 05:52 PM.


Mac Support® Version 3.7.0 Beta 5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.