PDA

View Full Version : Can you redirect RSS Feeds


washy21
10-31-2005, 07:38 AM
My old site was at www.shotsphotography.co.uk/blog/index.php. The rss feed was working fine

I basically re installed the site and took it out of the /blog directory so it is now at www.shotsphotography.co.uk plus www.johnwashington.co.uk because I have domain mapping in place. Again the rss feed works fine,

The problem is that I have a lot of viewers who still have the old domain in their newsreaders and they are not seeing my new content. In fact what they are getting is some strange old content which no longer exists in the old directory /blog.

I have re directed the url no problem by re-creating a folder called /blog and placing an index.html file with a refresh content tag. What I can't sort out is whether or not I can also re-direct the old rss feed to my new one which is basically up one level.

I suppose what I am trying to do is redirect
www.shotsphotography.co.uk/blog/index.php?x=rss
to
www.shotsphotography.co.uk/index.php?x=rss

Is this possible or am i trying in vain. Anyone please help.

Thanks
John

GeoS
10-31-2005, 08:50 AM
Insert index.php file into blog directory with such content:


if($_GET['x'] == 'rss') header('Location: '.$_SERVER['REQUEST_URI']);

washy21
10-31-2005, 12:53 PM
Hi Geos

I have done as suggested and it still seems the same. Do I have to add anything to this code

if($_GET['x'] == 'rss') header('Location: '.$_SERVER['REQUEST_URI']);

Alas, my crap coding brain is getting crapper.

Thanks again

GeoS
10-31-2005, 11:29 PM
Try to put to /blog/index.php:

if($_GET['x'] == 'rss') header('Location: /index.php?x=rss');

washy21
11-01-2005, 06:12 AM
Thanks Geos

I will try this - if not then I will give up - enough hours spent allready

thanks again

john