Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i prevent the url from changing in the address bar?

Status
Not open for further replies.

verbatim1

Programmer
Apr 18, 2005
58
US
quick question:

how do i prevent the url from changing in the address bar?

currently, when i type timmy.bar.com - it goes to but the address bar will continue to show timmy.bar.com.

After clicking on a link though, it will show the full url.

how do i configure it so that the address bar always shows timmy.bar.com?

thanks

My current redirection code
Code:
RewriteCond %{HTTP_HOST}!^([URL unfurl="true"]www\.)?(www¦mail¦images)\.domain\.com[/URL] 
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.bar\.com 
# ok rewrite now 
RewriteRule ^(.*) [URL unfurl="true"]http://www.bar.com/okay/%2/$1[/URL] [P,L]

What should i add????
 
thanks for the reply.

will the fact that there are multiple subdomains be an issue?

when someone goes to john.bar.com i want that to stay in the url. when someone goes to timmy or susie.bar.com i would like for it to say that until they go to someone elses site.

how would i configure that?

thnks in advance
 
verbatim1,

The part of the URL that you're referring to is known as a host in Apache terminology. As long as your VirtualHost containers all have a different ServerName, you have set NameVirtualHost to your IP address, and your DNS is set up properly it shouldn't interfere.

NameVirtualHost [your IP address]

<VirtualHost *>
ServerName host1.domain.com
DocumentRoot /path/to/host1/doc/root
</VirtualHost>

<VirtualHost *>
ServerName host2.domain.com
DocumentRoot /path/to/host2/doc/root
</VirtualHost>

And so on.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top