Thank you for you replies. Sorry, whether it does not seem sensible I'll repeat the process, I am most likely further complicating things!

I've got a frameset index.html, with top.php with is only the radio stream, under that's index.php the full joomla website with navigation and everything.

The issue is, if customers discover the website using a internet search engine. It will require drive them to simply the index.php plus they will not obtain the frameset using the top.php. I had been by using this code within the top.php and index.php:

if(self.location==top.location)self.location="index.html";

which is effective aside from it requires the consumer to index.php regardless of what page these were searching for using a internet search engine.

And So I found this short article (look under 'A better way' section) which demonstrates how to code it therefore if anyone's submissions are on about-us.html, it will lead you to that particular page but nonetheless make sure it is within the frameset. http://scriptasylum.com/tutorials/frameredirect/frameredirect.html

I'd like something of that nature but regrettably by using it as being a Joomla website, I do not have page1.html, page2.html etc to have the ability to add the code and alter it accordingly according to their instructions. I have only one page index.php which creates the web pages dynamically 'on the fly'

The same is true anybody know a means I'm able to do things i am wanting... The frame set reaches http://www.housocial.com/new/index.html

Only the joomla part http://www.housocial.com/new/index.php

Many thanks

You might extract the filename via RegExp(I am unsure if this sounds like what you are requesting)

if(self==top)
{
 self.location="index.html?"+encodeURIComponent(location.href.match(/\w+\.html$/));
}

A far more flexible solution that can take proper care of GET-parameters and anchors:

(
  function(url,pattern,query,hash)
  {
    var filename=location.pathname.match(pattern);
    if(filename)
    {
      url+=filename;
      if(query && location.search)
      {
        url+=location.search;
      }
      if(hash)
      {
        url+=location.hash
      }
    location.href=url;
    }
  }
)('http://www.housocial.com/new/index.php/', //target-URL
  /\w+\.html$/,       //pattern to search for
  1,                  //include QUERY_STRING
  1                   //include hash
  )