nanaya Wrote:
---
> Also in case of rewrite you probably want `break` since `last` restart
> location matching process
>
That did the trick :)! The `break` was the part I was not doing right.
Thanks @nanaya!!
Posted at Nginx Forum:
https://for
On Wed, Nov 4, 2015, at 05:27 AM, kodeninja wrote:
> Howdy, everyone!
>
> I'm trying to figure out if there's a way to achieve this with nginx:
> <http://stackoverflow.com/questions/33427101/nginx-rewrite-url-without-causing-redirect-and-proxy-to-backend-app>.
>
Howdy, everyone!
I'm trying to figure out if there's a way to achieve this with nginx:
<http://stackoverflow.com/questions/33427101/nginx-rewrite-url-without-causing-redirect-and-proxy-to-backend-app>.
I didn't get response on the SO question yet, so trying my luck here :).
On 2015-07-04 11:38, Philipp Kraus wrote:
Hello,
I try to use Nginx as a proxy (for SSL) on a Jetty server. The Jetty
application should be accessed by a subdirectory of my Nginx. I have setup this
location configuration:
location /myapp {
proxy_pass http://localhost:8112;
Hello,
I try to use Nginx as a proxy (for SSL) on a Jetty server. The Jetty
application should be accessed by a subdirectory of my Nginx. I have setup this
location configuration:
location /myapp {
proxy_pass http://localhost:8112;
proxy_set_headerX-Forwarded-Host
On Wed, Dec 17, 2014 at 09:15:54AM -0500, grydan wrote:
Hi there,
> I need that the URL request from any combination of FOLDER1 (case
> insensitive) is rewrite from URL
>
> http://www.pippo.com/FOLDER1/etc..etc..etc..
> to (always lowercase folder1)
>
> http://12.0.0.1/folder1/etc..etc..etc...
ok, but after that how can I use in my scenario this?
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,255565,255576#msg-255576
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
grydan Wrote:
---
> How can I use this module?
Re-compile like " --add-module=objs/lib/ngx_http_lower_upper_case"
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,255565,255575#msg-255575
___
How can I use this module?
I'm a newbie of NGINX
tnx
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,255565,255572#msg-255572
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
https://github.com/replay/ngx_http_lower_upper_case
would be the easiest solution.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,255565,255570#msg-255570
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
I have Nginx configured as reverse proxy
server {
listen 80;
server_name www.pluto.com;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:80
Any help on this really appreciate.
The request handler is in Lua. It basically breaks a request in to sub
requests, adds a query parameter to each sub request and directs them
through an consistent hash upstream module in C. The upstream configuration,
reads the query parameter and sets it to th
Hi,
I am using a query parameter in upstream module to serve request based on
consistent hashing. This query parameter is introduced in the request
handler module and not originally coming from the downstream. I would like
to remove this parameter once the job is done before sending it to an
upstr
On 5 December 2013 17:09, Raphael R. O. wrote:
> Hi guys,
>
> I'm trying to rewrite an url with a few parameters, but unsuccessfully.
You're almost there ;-)
> What i already tried:
>
> rewrite
> ^/category-body/categories/promotional(.*)utm_source=PromoCode&utm_medium=AddPromo&utm_campaign=Prom
Hi guys,
I'm trying to rewrite an url with a few parameters, but unsuccessfully.
The URL:
https://www.mysite.com.br/category-body/categories/promotionalXXX?utm_source=PromoCode&utm_medium=AddPromo&utm_campaign=PromoCode_AddPromo_moneycampaing
I need rewrite to:
https://www.mysite.com.br/digita
Steve,
Thanks for the suggestion. How would this additional check change the
solution I proposed on 9/16? It looks like it would prevent the rewrite
from occurring if other arguments (instead of title) were present?
Thanks again,
Andrew
On Sun, Sep 8, 2013 at 11:31 PM, Steve Holdoway wrote:
>
I think you need to do some regexp on the args
if ( $args ~ title=([^&]+) {
rewrite ^(.*)title=([^&]+).*$ /article/$2? last;
}
Note... totally untested.
Steve
On Sun, 2013-09-08 at 23:01 -0500, Andrew Martin wrote:
> Hello,
>
>
> I have read through the nginx rewrite documentation an
Francis,
I ended up coming up with this solution:
map $request_uri $request_basename {
~/(?[^/?]*)(?:\?|$)
$captured_request_basename;
}
server [
try_files $uri $uri/ @rewrite;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
On Wed, Sep 11, 2013 at 08:32:09AM -0500, Andrew Martin wrote:
Hi there,
> Using the similar statement "try_files $uri $uri/ /index.php;", if I visit
> this URL:
> http://mysite.com/index.php?title=my_test_page
> then the URL is rewritten to this, but it just loads the contents of
> index.php (wi
Francis,
Using the similar statement "try_files $uri $uri/ /index.php;", if I visit
this URL:
http://mysite.com/index.php?title=my_test_page
then the URL is rewritten to this, but it just loads the contents of
index.php (without the title variable):
http://mysite.com/my_test_page
What it shows wou
On Tue, Sep 10, 2013 at 09:07:46PM -0500, Andrew Martin wrote:
Hi there,
> Would it be possible to only redirect if the title $_GET variable is
> present?
Yes.
Use something like
if ($arg_title != "") {
return 302 http://mysite.com/$arg_title;
}
inside the "location = /index.php" bloc
Francis,
On Tue, Sep 10, 2013 at 11:46 AM, Francis Daly wrote:
> On Mon, Sep 09, 2013 at 08:23:36AM -0500, Andrew Martin wrote:
>
> Hi there,
>
> > If I use this line:
> > rewrite ^/index\.php(.*)$ http://mysite.com/$arg_title? redirect;
> >
> > /index.php?title=my_test_page redirects to /my_te
On Mon, Sep 09, 2013 at 08:23:36AM -0500, Andrew Martin wrote:
Hi there,
> If I use this line:
> rewrite ^/index\.php(.*)$ http://mysite.com/$arg_title? redirect;
>
> /index.php?title=my_test_page redirects to /my_test_page
That's what you asked for initially; I'd probably spell it as
locati
If I use this line:
rewrite ^/index\.php(.*)$ http://mysite.com/$arg_title? redirect;
/index.php?title=my_test_page redirects to /my_test_page
This is the URL I am looking for, but it still results in a 404, with this
displayed in the log:
[error] 16077#0: *156649 FastCGI sent in stderr: "Primary
--- Original message ---
From: "Andrew Martin"
Date: 9 September 2013, 15:53:01
> Thanks for the suggestions. I was not able to get $arg_title to work. Here is
> the relevant section of my nginx config: server_name mysite.com;
>
>
>
>
> try_files $uri $uri/ index.php;
>
>
> loc
Thanks for the suggestions. I was not able to get $arg_title to work. Here
is the relevant section of my nginx config:
server_name mysite.com;
try_files $uri $uri/ index.php;
location / {
rewrite ^/index\.php?title=(.*)$
http://mysite.com/$arg_title redire
On Mon, Sep 9, 2013 at 3:58 PM, mex wrote:
>> rewrite ^/index\.php?title=(.*)$ http://www.mysite.com/$1 redirect;
>
> this doesnt work? what is $1 then in the redirected request?
>
of course this won't work. Query string isn't part of rewrite matching string.
Use $arg_title instead.
http://ngin
> rewrite ^/index\.php?title=(.*)$ http://www.mysite.com/$1 redirect;
this doesnt work? what is $1 then in the redirected request?
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242676,242678#msg-242678
___
nginx mailing list
nginx@nginx.org
Hello,
I have read through the nginx rewrite documentation and looked at various
examples, but can't figure out how to create a rewrite rule for the
following (if it is possible). I'd like to rewrite the URL of a php file
with a $_GET argument and replace it with just the value of the $_GET
argume
29 matches
Mail list logo