hiding the web address

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sheepz
Forum Commoner
Posts: 58
Joined: Wed Jul 06, 2005 11:35 pm

hiding the web address

Post by sheepz »

1. i was wondering if i could hide the web address. if my site is http://www.website.com and someone clicked on the members page it would display http://www.website.com/members.php is there a way with php that i can hide or mask the address so when users navigate around it would display the root page only. regardless if they clicked on members, links, or any other hyperlink the address bar would display http://www.website.com

2. would there be a way to grab the current login name of the user that visits the site?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

  1. frames, no php required.
  2. hard to answer since I don't know how your code works, but I usually have some way of getting to it via something stored in session data.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: hiding the web address

Post by timvw »

sheepz wrote:1. i was wondering if i could hide the web address. if my site is http://www.website.com and someone clicked on the members page it would display http://www.website.com/members.php is there a way with php that i can hide or mask the address so when users navigate around it would display the root page only. regardless if they clicked on members, links, or any other hyperlink the address bar would display http://www.website.com
Why would you want to cripple the user experience by using these hacks you suggested?
sheepz
Forum Commoner
Posts: 58
Joined: Wed Jul 06, 2005 11:35 pm

Post by sheepz »

i didn't know masking or hiding the address is considered a "hack," sorry. when i visited other sites and it performed this action i thought it was esthetically pleasing, looks really clean
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I wonder how many times people look at the addressbar in their user-agent (assuming they have one), and i wonder how many that care about what is in there. The only reason i can see is when they want to tell someone else where they are... (Not really useful if it always displays example.org instead of the correct URL)
saqib81pk
Forum Newbie
Posts: 2
Joined: Mon Apr 03, 2006 5:08 am

Use frames it will fullfill ur requirements..

Post by saqib81pk »

Hi,

Use Frames it will fullfill your requirements. It will only show the main URL instead of full URL. like if your current URL is like http://www.isf.com.pk/home/index.asp , then it will only show http://www.isf.com.pk

Bye.
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Re: Use frames it will fullfill ur requirements..

Post by Nunners »

saqib81pk wrote:Hi,

Use Frames it will fullfill your requirements. It will only show the main URL instead of full URL. like if your current URL is like http://www.isf.com.pk/home/index.asp , then it will only show http://www.isf.com.pk

Bye.
That assumes your users have a browser that supports frames - anyone using a basic mobile device would probably not be able to view it.

It will also reduce your SEO ranking!
sheepz
Forum Commoner
Posts: 58
Joined: Wed Jul 06, 2005 11:35 pm

Post by sheepz »

thx for all the suggestions. i thought it just looked really clean but seems more trouble than it's worth. its ok if the user sees the pages, i'd rather not use frames =)
User avatar
ed209
Forum Contributor
Posts: 153
Joined: Thu May 12, 2005 5:06 am
Location: UK

Post by ed209 »

giving more info than just the URL can be very useful. bbc.co.uk are really good at it, I rarely bother to search, I just type in what I'm after (although I think it's done with ruby on rails). The principal behind it is what matters though.

If you want to have a neat address bar - and you absolutely should invest time in this, then the following is useful:
http://www.w3.org/QA/Tips/uri-choose
sheepz
Forum Commoner
Posts: 58
Joined: Wed Jul 06, 2005 11:35 pm

Post by sheepz »

that's some good advice thx!
Post Reply