Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 648867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:52:47+00:00 2026-05-13T21:52:47+00:00

That is to say, let’s say I’m writing something that’s hosted on foo.com .

  • 0

That is to say, let’s say I’m writing something that’s hosted on foo.com. I’d like it to be possible for a user who goes to foo.com/bar.com to be served up bar.com from foo.com and to be able to interact with bar.com (e.g. navigate to foo.com/bar.com/baz via point-and-click). I understand that this is what a proxy is supposed to do. I need to do some preprocessing of a request to access the proxy, which is why I’m turning to a web framework. I’ve a preference for django, rails, or sinatra, or another python/ruby solution, but any will do, really.

Thanks in advance; alternate suggestions are welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:52:47+00:00Added an answer on May 13, 2026 at 9:52 pm

    First you will need to parse the URL at foo.com. In django you could have an url like this(not tested):

    url(r'(?P<url>.*)$', my_proxy_view, name = 'proxy')
    

    So http://foo.com/bar.com/baz/ will give you an url of ‘bar.com/baz/’ you may use as you please in your view.

    Then you have to retrieve the page at bar.com, using a library like urllib2.

    When you have the contents of the remote page, you need to change all links(anchor elements) that point to bar.com to point to the URLs of your proxy. If you want to proxy images, stylesheets and javascript you need to change the links of those as well.

    You probably want to cache as much as possible as well. And be sure to set a user-agent on the urllib request that will let the other site know that this is some kind of robot or proxy.


    With that said, this sounds like a really stupid idea. What is your use case?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say that I'm writing a function to convert between temperature scales. I want
Let say that i have this to url's site.com/hello-world/test.html site.com/hello-world/test/test.html if i go to
This is something that work: $curRow[1]/@gridClose but let say that I do not know
Let say that I have a website with some information that could be access
Let's say that we have an ARGB color: Color argb = Color.FromARGB(127, 69, 12,
Let's say that I want to have a table that logs the date and
Let's say that you want to create a dead simple BlogEditor and, one of
Let's say that there is a solution that contains two projects (Project1 and Project2).
First let me say that I really feel directionless on this question. I am
Let's say that you have overridden an object's equals() and hashCode() methods, so that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.