•
•
•
•
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
![]() |
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??
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
•
•
Join Date: Sep 2007
Posts: 1,057
Reputation:
Rep Power: 3
Solved Threads: 61
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:
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.
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]It's apache with an .htaccess file.
Last edited by SheSaidImaPregy : Oct 20th, 2007 at 4:49 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Windows Explorer Issue: my "Address" bar is gone, how do I get it back? (Windows NT / 2000 / XP / 2003)
- Address Type: "Automatic Private Address" (?) (Networking Hardware Configuration)
Other Threads in the ASP Forum
- Previous Thread: Regarding ASP projects on NewsGroup
- Next Thread: ASP Search Database



Linear Mode