Page 1 of 2

is it possible to hide the paths on the address bar ?

Posted: Sat May 17, 2003 2:17 pm
by infolock
I was wondering, is it possible to hide the files you are opening in the address bar ?

ie, instead of the address being displayed as http://www.bob.com/somedir/spiffy.php

could it be displayed as
http://www.bob.com/

In case there are any questions, this is saying I own the domain bob.com ( which I don't, but it's just an example... )

if this is possible, could someone point me in the right direction? Thanks

Posted: Sat May 17, 2003 2:32 pm
by twigletmac
To get that effect you'd probably need frames.

Mac

Posted: Sat May 17, 2003 2:42 pm
by infolock
oh, you mean setting up a frame for one page, and then upon clicking a link, changing that forms value to the one you are wanting to direct th em to, and then reloading the page ?

if so, is that possible to do within php, or is it only possible in html script.

Posted: Sat May 17, 2003 7:48 pm
by patrikG
Use Javascript. I am sure there is something for you at http://www.hotscripts.com :)

Alternatively - yes, frames are created by HTML, but administered by Javascript. There should a tutorial at http://www.webmonkey.com about frames :)

Posted: Sat May 17, 2003 9:26 pm
by infolock
sweeeeeet, thanks

Posted: Sun May 18, 2003 3:40 am
by r337ard
shouldn't using POST data and reafiles work too?

example:

Code: Select all

<?
switch ($_POST&#1111;'op'])&#123;
  case "page1":
    page1();
    break;
  case "page2":
    page2();
    break;
  default:
    index();
    break;
&#125;;

page1()&#123;
  readfile("./somedir/spiffy.php");
&#125;
page2()&#123;
  readfile("./somedir/biffy.php");
&#125;
index()&#123;
  //your index here
&#125;;
?>
as long as its post data it wont show in the main page, you wouldn't see the directory paths for the readfiles. is there some php taboo im breaking here?? or some security concern?

Any Other Ways?

Posted: Thu Aug 28, 2003 3:44 am
by daisysf
Is there any other ways of doing this, I'm thinking in the lines of META, Header() or HTTP, without javascript and frames?

Posted: Thu Aug 28, 2003 4:03 am
by JayBird
you could open a new broswer window with address bar turned off

Mark

Yes, but no

Posted: Thu Aug 28, 2003 6:10 am
by daisysf
Thats interesting, but I'd rather have the address bar with just the domain only for each page accessed.

I thought this might work, but it does not;

<meta name="Identifier-URL" content="http://www.Domain.Com">

I'm thinking maybe something in Header() or maybe;

$URL = $HTTP_HOST or $SERVER_NAME

Posted: Thu Aug 28, 2003 9:09 am
by phice
Just press F11 when the address bar is taken off, and it's back on. ;)

Posted: Thu Aug 28, 2003 9:19 am
by JAM
Easy answer, not really.

Opening up anew window wont work as a user easy can make it visible again.
Making it invincible in frames will be spotted viewing the source of the page.
header() will just redirect the user to a different page.

Require(), include(), readfile() might be an option, as you are displaying a file thats not on the same (i assume) location as the actual page being viewed...

Posted: Thu Aug 28, 2003 11:37 am
by Unipus
Easier answer: I'm pretty sure this is something that mod_rewrite can handle easily. I've never tried telling it to report that everything is just the root domain, but I can't think of a reason why it wouldn't work. Of course, if you're not on an Apache server you'll have to think up something else.

But I should mention: using frames is a terrible idea. Unless you're on an intranet or somesuch, or there's some very specific application of your site that I can't think of, the cost-to-benefit ratio of frames is horrible. People need to stop using them, circa three years ago.

Posted: Sat Aug 30, 2003 8:46 am
by Drachlen
A search of url cloaking finds:
"Q. What is URL cloaking?

--------------------------------------------------------------------------------
A.
It is where a user types in a domain name into their browser, but ends up at a different URL. This can be achieved through DNS settings for your domain name.

Importantly, unlike with URL forwarding , it is the domain name itself that is displayed in the browser bar, the destination URL is "cloaked" by the use of browser "frames".

This is an excellent technique to use in a variety of circumstances. For example you may want to hide an affiliate code or an overly long URL. However the method does have inheritent limitations. For example, if the URL being forwarded to is on a secure server, browsers won't be able to detect this and the padlock won't display."

Posted: Sat Aug 30, 2003 10:08 am
by JAM

Posted: Sat Aug 30, 2003 10:29 am
by Drachlen
I found that iframe works a lot better, iframe is alot more compatable (to my knowledge) and doesnt require a bunch of files..

Try using this on the page you want it to always show up as:

<BODY TOPMARGIN=0 LEFTMARGIN=0>
<iframe FRAMEBORDER="0" width=100% height=100% src="Content.php" name="Content"></iframe>

Change that iframe the the main page of the page you want to show up, and it will always show up as that file in the url