php redirect from domain.com/blog/ (variable) to domain.com

I need some help with php coding, I need to edit an index.php file to redirect domain.com/blog/? (where ? is a variable) to domain.com

I don’t have access to my .htaccess file, because I am hosted with yahoo…“messing with that file can bring down the whole server” said the yahoo customer service lady…

Here’s the thing, I just edited out ‘blog’ of my domain, and I have search results on the first page of google, and consequently killed the links…I recreated the blog directory on my server to put an index.php file that redirects, but want it to redirect all links that start with domain.com/blog/ to domain.com

So, for example, say there is a link to domain.com/blog/2010/06/23/article I want it redirected to domain.com, but there are MANY more articles in every directory (i.e. 2010, 06 and 23)
So hopefully inside the php script is a variable that states if the link begins with ‘domain.com/blog/’ then redirect to ‘domain.com

Is this at all possible? I need to get this fixed ASAP! Any help is appreciated.

thanks,
[blank]

have a look at the php header text

basically you can run an if code
[php]

<?php $site = $get['$_server['httpreferrer']']; if ($site == http://www.domain.com/blog) { header('Location: domain.com'); }[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service