PDA

View Full Version : Hiding URL, except home page


TBGJohn
8-24-03, 12:16 AM
I've been trying to find a way to hide the long URL's to what will ultimately be my website. I've searched a dozen different forums and cannot find what I'm looking for.
Specifically, if someone types in www.yourpage.com, that's the only thing I ever want to have in the address bar. (I don't care if the links show in the bottom mouseover area)... http://www.yourpage.com/osCommerce/catalog/default.php is just too long a home page, and the SSL pages don't even have yourpage.com shown in the URL (powweb.com:####).

I've seen a couple of references about $_SERVER['PHP_SELF'];
but I'm not a programmer, and it looks like a rough learning curve. I am not even sure if it applies to hiding URL's... If it is though, is the header.php file a candidate to enter this code in since it's part of every page?

Please be specific should you answer... typing "put it your XXX.php file" doesn't tell me much.

Thanks.

stevel
8-24-03, 09:31 AM
I'm going to discourage you from this approach - as a user, I hate it when sites do that and it tends to make me go elsewhere. Also, you can't have the page title change as your site is navigated.

Other disadvantages are that some browsers won't be able to navigate this and some search engines can't follow the links.

The only way I know to do this is with a hidden frame like this:


<html>
<head>
<title>My Web Page</title>
</head>
<frameset>
<frame src="http://www.example.com/catalog">;
</frameset>
</html>


BTW, you don't have to have osCommerce in your path and don't have to explicitly specify default.php either.