Question : php redirect which also changes the source of an iframe

Hi,

The index page on the root of a website has one iframe called 'main' into which all other html pages load.
The iframe loads the page 'home.html'

However I would like to set a php redirect for the url
www.rjsfitness.co.uk/blog

which redirects to the page
www.rjsfitness.co.uk/index.php
however, rather than loading the source /home.html
in the iframe I would like to load /html/Blog.html

can you help?
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:





 
     
 
  
  

  

 

 


Answer : php redirect which also changes the source of an iframe

For a javascript solution which changes an iframe's src based on referrer you can use this.
Change localhost to your domain obviously.

Note javascript's document.referrer property doesn't seem to work if you are testing locally. I.e. pointing your browser directly at files, rather than accessing them over an http connection.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:





 
     
 
  
  

  
 
     

 

Random Solutions  
 
programming4us programming4us