User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 402,860 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,943 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 777 | Replies: 2
Reply
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 13
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

"Masking Real Address" on adress bar

  #1  
Oct 19th, 2007
my friend asked about masking real addresses shown in address bar...
normally:
http://www.myhost.com/index.asp?username=someone

he wants it like:
http://username.myhost.com

how can we do this??
Do a favour, leave me alone
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: "Masking Real Address" on adress bar

  #2  
Oct 20th, 2007
instead of sending your form via "get", send it via "post". It is all hidden from the querystring. That's all you need to do.

Well, that above makes it come out to www.myhost.com/index.asp

if you wish to get it to be www.username.myhost.com then it deals with apache language and the .htaccess file. It's a rewrite file that will rewrite all your urls to the correct format. Something like this would go as:
RewriteEngine on 
Options +FollowSymlinks 
RewriteCond %{HTTP_HOST} !^(www\.)?mysite\.com$ [NC] 
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.mysite\.com$ [NC] 
RewriteRule ^([^.]+\.asp)?$ http://www.mysite.com/$1?subd=%2 [L]
Don't quote me on this code, but at least now you know what you're into and where to look.

It's apache with an .htaccess file.
Last edited by SheSaidImaPregy : Oct 20th, 2007 at 4:49 pm.
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 251
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 13
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: "Masking Real Address" on adress bar

  #3  
Oct 20th, 2007
thank you for the idea...
Do a favour, leave me alone
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 1:21 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC