I was wondering if anyone knew how to make a web page load a certain way depending on what they type in the address bar:

For example if someone types in the address bar : http://xeononyx.frihost.net it directs you to my page with the default index page (my forum)

But I was wondering if there was a way I could make a link like so :
http://xeononyx.frihost.net/index.htm?loc=downloads
so it will load up my index page and put the index of the dowloads folder in the inline frame instead of the default index of the forum.

Its entirely possible, but you need to use something more than HTML - my suggestion would be PHP

Firstly: save all your index.htm file as index.php

then add the following code wherever you want the value of "loc" from the address (in this case inside the "href" value of your iframe):

Code:

<?php

//load post variables (security is not needed as file is not included):
$loc = $_POST['loc'];

//print the location
echo $loc;
?>

HOWEVER: There's a better way to do it. With php you can include the content of your other documents without using iframes (google cant read whats inside iframes, and they increase load times). This way you would probably place the content of your external document in a <div> container, and then strip the <html>,<head> and <body> tags from the document you wish to add to your page.

- all you have to do is exchange "echo" with "include" in the code above. There is a security issue with this though, if you have any pages you dont want your visitors to see - otherwise you should be ok though (if you want to know about the security stuff, search for "php htmlspecialchars" on google.)

XeononyX

Excellent! Thank you I was pretty sure php was involved, thanks for point me in the right direction.