homepage Welcome to WebmasterWorld Guest from
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

 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.




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


 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)

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