Welcome to WebmasterWorld Guest from 54.166.222.116

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

URL to stay domain name

     
7:52 am on Feb 10, 2014 (gmt 0)



Hi all,

I am new here, and hoping this has not been answered anywhere else. I have searched and could not find it. Apologies if it is.

Is there a way that I can make my PHP application not display the current path in the address bar?

So, what I want is for the address bar always display www.mydomainname.com but the page could actually be www.mydomainname.com/profile.php?id=295673

I know that using .htaccess could make it www.mydomainname.com/profile/295673 but that is not what I am looking for.

Any help is appreciated, thank you.

Cheers,
Adrian.
9:13 am on Feb 10, 2014 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



Can't be done. The browser, and only the browser, decides what to put in the address bar, based on the information it has about the current URL. If the browser believes-- whether correctly or otherwise-- that it is at example.com/directory/pagename, the address it displays will reflect that belief.

Some browsers, notably mobiles, just show the domain name. Some leave off the "http(s)" part. Some show the complete URL. There are probably other permutations. (Wasn't there some discussion of this behavior, a few Firefoxes ago?)
9:29 am on Feb 10, 2014 (gmt 0)



Thank you very much for your help Lucy24.
1:17 am on Feb 13, 2014 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



You could use a frame/iframe if you really really wanted to do this. The address will be hidden from the address bar, but the user can find if they really want to. However, you should be aware of the negative aspects of doing this (bad user experience, unable to bookmark, bad for SEO, etc.) - but maybe that is not a concern?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month