Quantcast

Forums | MacLife

You are not logged in.

#1 2005-02-25 12:12 pm

enviousltd
Member
Registered: 2005-02-23
Posts: 11

How to keep your address bar with your url only

I have a query on something.

I am trying to stop my address bar from displaying all the pages it visits whilst you click on certain links so it stays on your domain name only i.e www.domain.com because at the moment it displays everything it does.

Even when someone logs in or you go to billing address it seems to show it here even passwords when you log in...HOW CAN I STOP IT.

Offline

 

#2 2005-02-25 12:29 pm

Fracai
Evacipate
From: St. Elsewhere
Registered: 2000-05-25
Posts: 2841

Re: How to keep your address bar with your url only

so instead of
http://www.macaddict.com/forums/topic/53612
you want it to always show
http://www.macaddict.com/

because you are using a login method that sends your login info using the url, as in GET instead of POST.

you need a different method.

is this for your own site? or is it a bank you use?
if it's your own you need a better way to log in users.  if it's a bank, etc you need to drop 'em now.


   i am jack's amusing sig file
        http://alum.wpi.edu/~arno/i/s.png
Satellite Lot :: Second Summer

Offline

 

#3 2005-02-25 12:38 pm

BadMrMojo
Member
Registered: 2002-04-03
Posts: 171

Re: How to keep your address bar with your url only

<form method="post" action="whatever.php" enctype=etc...

(The method part will keep the form data out of the URL, just to clarify upon what Fracai said)

Offline

 

#4 2005-02-25 12:41 pm

Fracai
Evacipate
From: St. Elsewhere
Registered: 2000-05-25
Posts: 2841

Re: How to keep your address bar with your url only

mmm, looking back on that post it _is_ hardly readable.
Thanks.


   i am jack's amusing sig file
        http://alum.wpi.edu/~arno/i/s.png
Satellite Lot :: Second Summer

Offline

 

#5 2005-02-25 12:56 pm

enviousltd
Member
Registered: 2005-02-23
Posts: 11

Re: How to keep your address bar with your url only

so fracai thats it always to show e.g www.macaddict.com yeh its for my own site.

Offline

 

#6 2005-02-25 12:58 pm

enviousltd
Member
Registered: 2005-02-23
Posts: 11

Re: How to keep your address bar with your url only

so where do i put this statement on all the pages...new to this guys help me out

Offline

 

#7 2005-02-25 1:11 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9942
Website

Re: How to keep your address bar with your url only

The only way I know to do this without convoluting the system would be to use frames. But frames are evil.

The forms idea is an interesting one, but rather convoluted. You'll have to make a form for each button, or make one form with buttons that are javascript activated. But that's just wrong to use for navigation.

Really, though, why don't you want people to see what page they are on in the URL?

Offline

 

#8 2005-02-25 1:14 pm

Fracai
Evacipate
From: St. Elsewhere
Registered: 2000-05-25
Posts: 2841

Re: How to keep your address bar with your url only

this won't hide everything except the domain.  all it will do is hide the password and user name etc that would be passed by the form that you're using to log in users.

I don't know of a realistic way to hide the full path.  Frames would do it, but all you really want to hide is the password stuff right?


   i am jack's amusing sig file
        http://alum.wpi.edu/~arno/i/s.png
Satellite Lot :: Second Summer

Offline

 

#9 2005-02-25 1:26 pm

enviousltd
Member
Registered: 2005-02-23
Posts: 11

Re: How to keep your address bar with your url only

Gipetto
i thought it would just look cleaner cos at the moment my site shows everything in the url i mean the lot all your delivery details calculations in the shopping basket ...when you login in password and username, customer no i wanna do it something like www.forzieri.com theres stays the same no matter where you are

Offline

 

#10 2005-02-25 1:27 pm

zakatak
Member
From: Kalamazoo
Registered: 2004-08-05
Posts: 565

Re: How to keep your address bar with your url only

if you were building a dynamic page system (with say PHP) such a beast could be possible... you'd have to use sessions and constantly refer back to the main page which would dish out the appropriate files that you have coded for...

to be honest it will be relatively difficult to implement and you will probably not want to embark on such an adventure...

if you do though, you'd best clear your next few months and start learning PHP

Offline

 

#11 2005-02-25 1:31 pm

BadMrMojo
Member
Registered: 2002-04-03
Posts: 171

Re: How to keep your address bar with your url only

Gipetto wrote:

The forms idea is an interesting one, but rather convoluted.

Ugh. Yeah. I didn't actually mean for every single link! I think it would work but... ugh. Who wants to deal with that?

I thought he meant that he had a form in which the user would enter their name and password and then they'd show up as a query string in the url.

http://www.domain.com/action.php?user=bob&pass=password&action=login

Is that the part you're concerned about, enviousltd? If you just put 'method="post"' in your form tag, you'll end up with:

http://www.domain.com/action.php

and the user, pass and action variables will be accessible in the POST array ( $_POST['user'], etc.. in PHP ).


{ edit: Oops. I just saw what he was asking about. Nevermind this, but there's no _practical_ way of doing that. It'd drive you start raving insane and users generally don't actually care. In fact, I'd be annoyed, personally. }

Last edited by BadMrMojo (2005-02-25 1:34 pm)

Offline

 

#12 2005-02-25 1:35 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9942
Website

Re: How to keep your address bar with your url only

What Zak said. What you're talking about is session data. It does that to reduce dependencies on the client accepting cookies.
There might be an option to force use of cookies so that all that will go into a session var instead of the URL - that will depend upon the package though. Worth looking into.

So, it doesn't sound like you're opposed to something like:
http://www.server.com/shopping/item
or
http://www.server.com/shopping/checkout
so long as the client info is hidden. Correct? If so, look into changing the way sessions are handled. I can't quite remember the actual terminology for it but it will depend heavily on wether the shopping cart you are using supports that option.

Offline

 

#13 2005-02-25 1:40 pm

enviousltd
Member
Registered: 2005-02-23
Posts: 11

Re: How to keep your address bar with your url only

The shopping cart has been built from scratch and is not off the shelf.

Gipetto yeh i just want to hide the unnesscary info such as delievry address etc from the url as it look very unprofessional

Offline

 

#14 2005-02-25 1:47 pm

enviousltd
Member
Registered: 2005-02-23
Posts: 11

Re: How to keep your address bar with your url only

well if anyone has the simple answer let us know co i am still trying to code for this BAS????. If anyone has any ideas on this let me know please

I have products which has a main product code. For each of these codes these is a productID, variation code, colours and sizes. What i want to do is design from wht i have allready done to get the colour and size to be in drop down format.

The latter will populate the size drop down when a colour is selected, checking for dupliactes and showing only which sizzes are in stock for that colour. look at this mess i have created. HELP HELP http://www.macaddict.com/forums/topic/53448

Offline

 

#15 2005-02-25 1:49 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9942
Website

Re: How to keep your address bar with your url only

In that case a good chunk of the code might have to be changed. It sounds like your data might be passed via "get" which means that the forms need to be changed to a "post" method and all the back end processing needs to be changed to look for $_POST instead of $_GET. It can be a long and tedious process.

And I just realized that my comment about sessions is probably wrong...

Offline

 

#16 2005-02-25 2:08 pm

stoned
self employed
From: north little havana
Registered: 2001-11-13
Posts: 4031
Website

Re: How to keep your address bar with your url only

not sure if this helps, but i was screwing around with the DNS service on my server and somehow i screwed it up to the point where DNS and web sharing was working, but it would only display www.mydomain.com in the address bar of browsers. no matter what i do, i can't get it to display anything but www.mydomain.com no matter what page you are on.


i guess this would only help if you are hosting on OSX server. let me know and i can show you my DNS records.


"the bible is cooler than i thought.... most of the main characters get stoned!!!"
"let's get back to the good ol' days when the "opiate of the masses" was still actually opium."  -me
"kids don't beat me. i beat kids." -HJS
the above post is proudly antihammer

Offline

 

#17 2005-02-25 2:15 pm

enviousltd
Member
Registered: 2005-02-23
Posts: 11

Re: How to keep your address bar with your url only

SO DO U PREFER THAT STONED I WOULD......I AM HOSTING ON A LINUX RED CAT SERVER

Offline

 

#18 2005-02-25 2:38 pm

The New Guy
Member
From: Left of left
Registered: 2000-10-18
Posts: 3422

Re: How to keep your address bar with your url only

Red Cat?

Frames would be easy, though. Just make an iFrame that was the same size as the window.

Easy, but evil.


The car of the future is a train with a bike waiting at the other end.

Offline

 

#19 2005-02-26 8:10 am

maxintosh
Registered: 2004-02-28
Posts: 3631
Website

Re: How to keep your address bar with your url only

The New Guy wrote:

Red Cat?

Frames would be easy, though. Just make an iFrame that was the same size as the window.

No. No they wouldn't be. Not at all.

Offline

 

#20 2005-02-26 2:57 pm

Scott
Zombie Gorilla
From: Oregon
Registered: 2002-12-07
Posts: 3446
Website

Re: How to keep your address bar with your url only

enviousltd wrote:

The shopping cart has been built from scratch and is not off the shelf.

Gipetto yeh i just want to hide the unnesscary info such as delievry address etc from the url as it look very unprofessional

Hiding or obscuring the complete url is a bad idea.

You dont want to hide the product data and such.  It breaks bookmarks and direct linking.  Just maintaining the root url not matter what page you are on is bad idea.  Worse than frames. 

If you are talking about reg and login pages, then as been said before, use post.  Since you built this, that should be simple enough to change. 

The rest is fine passing data.  You wont find a big time site that doesn't do it that way.  Except Audible.com, but their method sucks.


http://www.greatgamesexperiment.com/images/logo_kit/468x60-Blue.gif

Offline

 

#21 2005-04-10 6:08 am

slarti
Member
Registered: 2005-04-10
Posts: 1

Re: How to keep your address bar with your url only

You guys, there is a REALLY simple way of doing this using framesets

Just use the code

<html>
<head>
<title>site name</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset>
<frame noresize scrolling="no" name="top_frame" src="/yourwebpage.html">
</frameset>
</html>

Notice that there is no body tags.  When you use the frameset in this way, no matter what page you go to in your site, only the index page URL will display in the address bar.  Dont believe me?  Try http://www.aforms.com, then try http://forms.ubisys.co.uk.  The second site simply loads the aforms site into its own frameset making it look like your actually on the ubisys site.

Cool huh?

Offline

 

#22 2005-04-10 7:24 am

Scott
Zombie Gorilla
From: Oregon
Registered: 2002-12-07
Posts: 3446
Website

Re: How to keep your address bar with your url only

No, not cool.  Framesets are not a good idea.  As above it breaks navigation, bookmarking and search engines.  No valid reason to do it that way.


http://www.greatgamesexperiment.com/images/logo_kit/468x60-Blue.gif

Offline

 

#23 2005-04-10 7:29 am

zakatak
Member
From: Kalamazoo
Registered: 2004-08-05
Posts: 565

Re: How to keep your address bar with your url only

what if your self-proclaimed purpose in life is to add to the ever-growing abyss of dead links and internet nowheres?

Then is it 'valid'?

Oh and aren't you up early?

Offline

 

#24 2005-04-10 7:32 am

Alien
Forum Czar
Administrator
From: Republic of Amsterdam
Registered: 1999-07-05
Posts: 17005
Website

Re: How to keep your address bar with your url only

No. Not cool.

,xtG
.tsooJ


http://macstack.net/forums/images/smilies/lol.gif

Offline

 

#25 2005-04-11 1:57 am

Light Speed
Doubter of Einstein
Registered: 2002-08-17
Posts: 3694

Re: How to keep your address bar with your url only

You can use frames if we can cut off one of your fingers for each frame smile

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson