Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Rewrite Subdomains to Paths (Valentin V. Bartenev)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kurtis Mullins  
View profile  
 More options Mar 26 2012, 10:14 am
From: Kurtis Mullins <kurtis.mull...@gmail.com>
Date: Mon, 26 Mar 2012 10:14:53 -0400
Local: Mon, Mar 26 2012 10:14 am
Subject: Re: Rewrite Subdomains to Paths (Valentin V. Bartenev)

Hello,

Thanks for the quick reply. I apologize ahead-of-time if this is the
incorrect way to reply to messages on here. I have my notification settings
set to once per day.

Anyways, this would definitely work for redirects. Is it possible to do it
in a way that is transparent to the end-user and my WSGI Application
server? Basically, when the user accesses
username.example.com/foo/bar/then my WSGI Application would just see "
example.com/username/foo/bar/". I'm trying to get around a limitation of
django where it processes URLs based on the path alone. I mainly want this
done dynamically so I don't have thousands of configuration directives
going on.

Thanks again!

_______________________________________________
nginx mailing list
ng...@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Francis Daly  
View profile  
 More options Mar 26 2012, 12:28 pm
From: Francis Daly <fran...@daoine.org>
Date: Mon, 26 Mar 2012 17:28:52 +0100
Local: Mon, Mar 26 2012 12:28 pm
Subject: Re: Rewrite Subdomains to Paths (Valentin V. Bartenev)

On Mon, Mar 26, 2012 at 10:14:53AM -0400, Kurtis Mullins wrote:

Hi there,

> Anyways, this would definitely work for redirects. Is it possible to do it
> in a way that is transparent to the end-user and my WSGI Application
> server?

That's (mostly) up to your application server.

> Basically, when the user accesses
> username.example.com/foo/bar/then my WSGI Application would just see "
> example.com/username/foo/bar/".

On the nginx side, you "just" adjust the uwsgi_param values that you send.
(Assuming that's how nginx access the application.)

But before you do that: try accessing the WSGI Application using the
example.com/username/foo/bar/ style urls. Look in the returned content. Do
you see the string "username" anywhere? Do you see any linked content
with a url that starts "/" or with multiple "../"? Do you see any linked
content with a url that includes "example.com"?

If you do, consider how they will look to a client which thinks that
its initial request was to username.example.com/foo/bar.

You can get nginx to mangle http headers. You shouldn't get nginx to
mangle the http body.

It can work. But it is worth testing your particular setup to make sure
that it works for you.

        f
--
Francis Daly        fran...@daoine.org

_______________________________________________
nginx mailing list
ng...@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »