Current location: Hot Scripts Forums » Programming Languages » PHP » How do I only show domain name in a browsers adress field ?


How do I only show domain name in a browsers adress field ?

Reply
  #1 (permalink)  
Old 07-27-04, 04:21 AM
Drubbel Drubbel is offline
New Member
 
Join Date: Jul 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
How do I only show domain name in a browsers adress field ?

Just like the title says:

Many websites only display www.sitename.com in the adressfield of a browser no matter which webpage you are on at that site.

Is there any script or code snippet that does this ?
I would want a PHP script for that but any code/script of any type is appriciated !

Thanks !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-27-04, 11:56 AM
Bonzo's Avatar
Bonzo Bonzo is offline
Coding Addict
 
Join Date: Jan 2004
Posts: 340
Thanks: 0
Thanked 0 Times in 0 Posts
I want my site to only display www.sitename.com as well

You coud use php includes which will do it but there can be problems that way.


Anthony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-27-04, 12:08 PM
cigcode cigcode is offline
Newbie Coder
 
Join Date: Oct 2003
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
You can use url rewrite for this, but how does your site show its url?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 07-27-04, 12:16 PM
MrKafaaski's Avatar
MrKafaaski MrKafaaski is offline
Newbie Coder
 
Join Date: Jul 2004
Location: Hurum, Norway
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
You can use a frame in the index-file:
Code:
<html>
<head>
<title>You title</title>
</head>
<body>
<frame src="index2.php">
<noframes>
Your browser does not support frames, click here: <a href="index2.php">index2.php</a>
</noframes>
</body>
</html>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 07-27-04, 12:48 PM
infinitylimit's Avatar
infinitylimit infinitylimit is offline
Code Guru
 
Join Date: Jun 2004
Location: Oregon
Posts: 758
Thanks: 0
Thanked 0 Times in 0 Posts
You could use a query string to do everything hence you would have www.sitename.com/?page=blah

that isn't to hard to do.
__________________
Hawk Enterprises -- Home to PHP games, open-source code, tutorials and free downloads
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 07-27-04, 03:29 PM
jasong jasong is offline
Wannabe Coder
 
Join Date: Feb 2004
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
One thing you can do is kind of like what MrKafaaski said.
Many domain registrars (godaddy in know) offer URL masking, where it masks the url and keeps it at the domian name.
In reality all it does is add a frame, but this way it does it automaticlly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 07-27-04, 08:45 PM
infinitylimit's Avatar
infinitylimit infinitylimit is offline
Code Guru
 
Join Date: Jun 2004
Location: Oregon
Posts: 758
Thanks: 0
Thanked 0 Times in 0 Posts
I would probably advise against doing a complete change to only www.yourname.com type of url. Just because then no one will be able to address links two your site accurately and you will generate more 404 errors then you will know how to handle. I would say go with the www.yourname.com?page=blah if anything because then people can at least get to the page.

Even though frames will mask the ip, you will be using frames. Frames don't print well and are generally hard for people to understand how to print.

I do think you can do the apache rewrite but I'm not sure how. Maybe you can find a site the doesn' use frames or query string and still has that and ask how they do it.

You also should take in account that webcrawlers might get lost, I'm not sure how smart they are concerning this and you might get a low page rank.
__________________
Hawk Enterprises -- Home to PHP games, open-source code, tutorials and free downloads
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
formmail problem gscraper Perl 12 08-27-04 04:06 AM
How do I hide my webpages and show only domain name in browser adress field ? Drubbel Script Requests 2 07-28-04 01:38 PM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 11:15 AM
domain check ramez Script Requests 8 03-07-04 12:26 AM
Form field values don't show in my browser cstallins PHP 6 10-19-03 12:12 PM


All times are GMT -5. The time now is 10:36 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.