Connecting Tech Pros Worldwide Forums | Help | Site Map

Redirect without changing `address` in your browser?

howachen@gmail.com
Guest
 
Posts: n/a
#1: Oct 5 '06
header("Location: http://www.example.com/");

i don't want the browser to show http://www.example.com

any method?

thanks.


Kimmo Laine
Guest
 
Posts: n/a
#2: Oct 5 '06

re: Redirect without changing `address` in your browser?


<howachen@gmail.comwrote in message
news:1160039425.558369.136670@m73g2000cwd.googlegr oups.com...
Quote:
header("Location: http://www.example.com/");
>
i don't want the browser to show http://www.example.com
>
any method?

<?php

include('http://www.example.com/');
exit();

?>
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
spam@outolempi.net || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)


.:[ ikciu ]:.
Guest
 
Posts: n/a
#3: Oct 5 '06

re: Redirect without changing `address` in your browser?


Hmm Uzytkownik <howachen@gmail.comwrote:
Quote:
header("Location: http://www.example.com/");
its same what you will type address in url filed in webbrowser and you won't
see it :)


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl

2be || !2be $this =mysql_query();


.:[ ikciu ]:.
Guest
 
Posts: n/a
#4: Oct 5 '06

re: Redirect without changing `address` in your browser?


Hmm Kimmo Laine <spam@outolempi.netwrote:
Quote:
include('http://www.example.com/');
exit();
exactly


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl

2be || !2be $this =mysql_query();


howachen@gmail.com
Guest
 
Posts: n/a
#5: Oct 5 '06

re: Redirect without changing `address` in your browser?



Kimmo Laine 寫é“:
Quote:
<howachen@gmail.comwrote in message
news:1160039425.558369.136670@m73g2000cwd.googlegr oups.com...
Quote:
header("Location: http://www.example.com/");

i don't want the browser to show http://www.example.com

any method?
>
>
<?php
>
include('http://www.example.com/');
exit();
>
?>
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
spam@outolempi.net || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)
i can't use include() as the file is very large, i want apache to serve
the file, while hiding the file path.

.:[ ikciu ]:.
Guest
 
Posts: n/a
#6: Oct 5 '06

re: Redirect without changing `address` in your browser?


Hmm U¿ytkownik <howachen@gmail.comwrote:
Quote:
i can't use include() as the file is very large, i want apache to
serve the file, while hiding the file path.

readfile will print all what is on this page on your page

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl

2be || !2be $this =mysql_query();


phpmyforum@googlemail.com
Guest
 
Posts: n/a
#7: Oct 5 '06

re: Redirect without changing `address` in your browser?


i don't want the browser to showhttp://www.example.com

Yes, just use Rewrite-Rules with "P" flag like this:

RewriteRule ^(.*)$ http://www.example.com$1 [P,L]

Not perfect, but a solution.

usenet+2004@john.dunlop.name
Guest
 
Posts: n/a
#8: Oct 5 '06

re: Redirect without changing `address` in your browser?


howachen@gmail.com:
Quote:
header("Location: http://www.example.com/");
>
i don't want the browser to show http://www.example.com
My browser's address bar shows the URL of the current resource.

The solution to your perceived problem is stop wanting that.

The real question is why.

--
Jock

howachen@gmail.com
Guest
 
Posts: n/a
#9: Oct 5 '06

re: Redirect without changing `address` in your browser?



phpmyforum@googlemail.com 寫é“:
Quote:
Quote:
Quote:
i don't want the browser to showhttp://www.example.com
>
Yes, just use Rewrite-Rules with "P" flag like this:
>
RewriteRule ^(.*)$ http://www.example.com$1 [P,L]
>
Not perfect, but a solution.
Hello, this seems to be my solution...

but will there be any overhead in doing this? i mean the proxy pass?

Jerry Stuckle
Guest
 
Posts: n/a
#10: Oct 5 '06

re: Redirect without changing `address` in your browser?


howachen@gmail.com wrote:
Quote:
phpmyforum@googlemail.com 寫é“:
>
>
Quote:
Quote:
>>>>>i don't want the browser to showhttp://www.example.com
>>
>>Yes, just use Rewrite-Rules with "P" flag like this:
>>
>>RewriteRule ^(.*)$ http://www.example.com$1 [P,L]
>>
>>Not perfect, but a solution.
>
>
Hello, this seems to be my solution...
>
but will there be any overhead in doing this? i mean the proxy pass?
>
I see someone else beat me to it - I was going to suggest the same thing :-)

Yes, there's always overhead when you're changing the default behavior.
There is less if you place this in the httpd.conf file than in
..htaccess, but it's still there.

The biggest problem with .htaccess is it needs to be read every time a
file in this directory or any subdirectory is accessed. But for
something this small it will probably be cached by the file system most
of the time anyway, so it wouldn't make a lot of difference.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
NC
Guest
 
Posts: n/a
#11: Oct 5 '06

re: Redirect without changing `address` in your browser?


On Oct 5, 2:10 am, howac...@gmail.com wrote:
Quote:
>
header("Location:http://www.example.com/");
>
i don't want the browser to show http://www.example.com
>
any method?
Use URL rewriting.

Cheers,
NC

phpmyforum@googlemail.com
Guest
 
Posts: n/a
#12: Oct 6 '06

re: Redirect without changing `address` in your browser?


Quote:
Quote:
but will there be any overhead in doing this? i mean the proxy pass?I see someone else beat me to it - I was going to suggest the same thing :-)
The largest overhead in this "solution" is that every request goes over
your webserver and so your traffic will grow.

Jits
Guest
 
Posts: n/a
#13: Oct 10 '06

re: Redirect without changing `address` in your browser?


thanks for theses postings?

regards
Jitendra

Closed Thread