469,268 Members | 942 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

Redirect without changing `address` in your browser?

header("Location: http://www.example.com/");

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

any method?

thanks.

Oct 5 '06 #1
12 26000
<ho******@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
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 pivittyv nettisarjis
sp**@outolempi.net || Gedoon-S @ IRCnet || rot13(xv***@bhgbyrzcv.arg)
Oct 5 '06 #2
Hmm Uzytkownik <ho******@gmail.comwrote:
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();
Oct 5 '06 #3
Hmm Kimmo Laine <sp**@outolempi.netwrote:
include('http://www.example.com/');
exit();
exactly
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl

2be || !2be $this =mysql_query();
Oct 5 '06 #4

Kimmo Laine 寫道:
<ho******@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
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
sp**@outolempi.net || Gedoon-S @ IRCnet || rot13(xv***@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.

Oct 5 '06 #5
Hmm Uytkownik <ho******@gmail.comwrote:
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();
Oct 5 '06 #6
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.

Oct 5 '06 #7
ho******@gmail.com:
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

Oct 5 '06 #8

ph********@googlemail.com 寫道:
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?

Oct 5 '06 #9
ho******@gmail.com wrote:
ph********@googlemail.com 寫道:

>>>>>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.
js*******@attglobal.net
==================
Oct 5 '06 #10
NC
On Oct 5, 2:10 am, howac...@gmail.com wrote:
>
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

Oct 5 '06 #11
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.

Oct 6 '06 #12
thanks for theses postings?

regards
Jitendra

Oct 9 '06 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Damo | last post: by
6 posts views Thread by lukeo | last post: by
3 posts views Thread by Justin | last post: by
6 posts views Thread by Peter Row | last post: by
56 posts views Thread by UKuser | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.