The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 05:33:30 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: use htaccess to display a remote site?  (Read 3538 times)
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« on: October 15, 2008, 12:17:47 PM »

Im having a hard time concentrating.

I have two domains. DomainA and DomainB.
I want DomainA to display what is on DomainB.

I cannot do DNS or host headers otherwise this would be irrelevant.

So using htaccess, is there a way to allow a user to surf on DomainA, but actually display and pull the information from DomainB?
Kind of like an htaccess version of host headers?
Without the URL changing btw.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #1 on: October 15, 2008, 12:24:18 PM »

If you have mod_proxy enabled, yeah.
Logged

hai
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #2 on: October 15, 2008, 12:51:04 PM »

how would I find that out, without shell access?
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: October 15, 2008, 01:28:05 PM »

Hey Nuts - just have a few moments here, inet is shitty in Venice...

but the bottom line is much like you'd rewrite a url you can rewrite to a proxy. Consider:

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

although I can't check it ATM, this says that it's the last rewrite, to proxy the request... essentially this makes your server a surfer to the proxied box. I do it in production on a few sites where the front edge is a sun box and it proxies backwards into rendering boxes - I can help when I get home, Sunday.

Hope this points you in the right direction
/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #4 on: October 15, 2008, 01:46:33 PM »

yea i tried that. I am guessing that failure indicates that there is no mod-proxy.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #5 on: October 15, 2008, 03:23:03 PM »

i just realized i could do this via a php page with file_get_contents. Duh. simple.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
svakanda
Expert
****
Offline Offline

Posts: 131



View Profile
« Reply #6 on: December 25, 2008, 09:38:45 PM »

not sure if this does it for you...but I'm a fan of the <iframe>...doesn't change addr in browser, totally transparent etc..etc..
Logged

a ship is safe in the harbor, but that's not what it's for.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!