homepage Welcome to WebmasterWorld Guest from 54.197.211.197
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
URL to stay domain name
pingcent



 
Msg#: 4643837 posted 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.

 

lucy24

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



 
Msg#: 4643837 posted 9:13 am on Feb 10, 2014 (gmt 0)

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?)

pingcent



 
Msg#: 4643837 posted 9:29 am on Feb 10, 2014 (gmt 0)

Thank you very much for your help Lucy24.

penders

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



 
Msg#: 4643837 posted 1:17 am on Feb 13, 2014 (gmt 0)

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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved