0
votes
3answers
26 views

How to remove hypen (-) using nginx rewrite rule?

I am using this rewrite rule to redirect example.com/a-b-c?id=learn-more ----> http://example.com/abc?id=learnmore rewrite ^/a-b-c?id=learn-More http://example.com/abc?id=learnMore permanent But ...
1
vote
2answers
105 views

nginx url rewriting. i just don't get it

Ok, an example url is http://www.mysite.com/?p=account&view=settings the p uri is a constant. all urls have it. the view is one of many optional uri. i've tried to understand url rewriting ...
0
votes
1answer
76 views

How to tell Nginx to not rewrite URL's in selected location

I am writing some PHP CMS code with a clean url implementation in Nginx. To improve security of my code I want to rewrite all of the requests in my root directory / using the following type: rewrite ...
0
votes
1answer
116 views

Nginx URL virtual host rewrite issues with Magento e-commerce. Help please

I've been running into some serious problems with my URL rewrites and I can't seem to fix it on my own strength and knowledge and troubleshooting on the web! Basically what happens is that when I ...
1
vote
1answer
64 views

Access log of nginx: why are foreign URLs logged?

My access log is full of such entries: 178.207.40.219 - - [03/Apr/2014:17:34:37 +0200] "GET http://win.mail.ru/cgi-bin/auth?Login=nutyck@bk.ru&Domain=mail.ru&Password=241716 HTTP/1.1" 403 168 ...
0
votes
0answers
44 views

Nginx URL rewrite / mask

Currently, my $_GET parameters are ordered alphabetically (a, b, c, d, etc...) For example: https://domain.com/?a=Menu1&b=Menu2&c=Menu3 What I want is this URL: ...
0
votes
0answers
37 views

nginx rewrite subdomain to other subdomain

I have a atlassian server with the following config: server { listen 443; server_name servicedesk.example.nl; ssl on; ssl_certificate certs/jira.cer; ssl_certificate_key ...
1
vote
0answers
38 views

Paths Generated by PHP Applications Incorrect In Fedora nginx php-fpm Setup

I have been having several issues with certain PHP apps lately on my Fedora nginx + php-fpm setup. I originally had this issue with Owncloud, and created a question, without much luck, but I am ...
0
votes
1answer
345 views

Ngnix Rewrite - If URL contains

I'm having a small issue - my error log is filling up with requests to a directory folder on my site (but with added data that shouldn't be there). http://example.com/the-directory/undefined ...
2
votes
2answers
1k views

Add trailing slash when it's missing in nginx

I'm running Magento on Nginx using this config: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/configuring_nginx_for_magento. Now I want to 301 all URLs without trailing slash ...
0
votes
1answer
212 views

nginx rewrite rules with regex applied to one subdirectory only

I've been frustrated for days trying to figure this out, so any advice/help would be greatly appreciated! I've recently added a section called /links to a site at somehost.com but can't seem to get ...
1
vote
1answer
257 views

How to change $request_uri in nginx?

We get information from $_SERVER['REQUEST_URI'] not from $_GET or $_POST. I want to define $request_uri to change /example to /module/controller/action not redirect. I tried code blow to do this ...
0
votes
1answer
143 views

nginx django suburl doesn't work

I'm trying to setup django under some suburl, lets say /myproject, with nginx and uwsgi. However, I can't get it working. Whatever I try, seems that uwsgi_modifier1 30; option doesn't work. I always ...
-1
votes
1answer
607 views

“A” record redirect gives 400 Bad Request in nginx [closed]

I've registered a domain with NameCheap and have set up an A redirect to my web server. Visiting the server directly (http://1.2.3.4) is fine, but going through the domain name returns 400 Bad Request ...
1
vote
3answers
237 views

nginx: How to redirect root to subdirectory while maintaining URL in the address bar

I have an nginx setup with folder structure like this: - www |- splash |- blog www is the root folder. I would like to redirect users who access http://mysite.com to the splash folder. But I don't ...
0
votes
0answers
127 views

here is a redundant '/' in the url when I access my local site. why?

I have a web site setup with nginx and php-fpm. When I access my local site,the URL has a redundant '/' in it and part of the URL gets repeated Example: When I access "mydomain/admin.php", then the ...
0
votes
1answer
129 views

Rewrite certain URL in Nginx such that another app will serve it

I have a config file for mydomain.com which is served with Drupal. Problem is this rewrite rule takes the control over any request: if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?q=$1 ...
5
votes
2answers
2k views

Disabling URL decoding in nginx proxy

When I browse to this URL: http://localhost:8080/foo/%5B-%5D server (nc -l 8080) receives it as-is: GET /foo/%5B-%5D HTTP/1.1 However when I proxy this application via nginx (1.1.19): location ...
1
vote
0answers
238 views

nginx proxy_pass to different backends based on location / passing rewrited url

What the quickest and cleanest solution if you want to proxy URL request to two different backends via proxypass based on location. location /app1/ { alias /var/www/ruby/public; ...
1
vote
1answer
321 views

Rewrite rule for language fragments in nginx

I want to rewrite some url's in nginx and I have an wordpress site with URLs like this: http://mydomain.com/en/my-content How can is remove the en/ with nginx? Thanks a lot. Peter
0
votes
1answer
59 views

How do I Nginx rewrite with query?

how do I rewrite this url from: mysite.com/folder1/file.php?kw=KEYWORD to mysite.com/folder1/file/KEYWORD and ...
2
votes
1answer
46 views

Access all websites on a server via a shared domain

My setup is: Nginx(80) as a transparent proxy Apache(81) as back-end web server The paths to each domain on the server are like this: /var/www/$username/data/www/$domainname Of course to access ...
1
vote
2answers
842 views

Structuring an nginx config for static content and php

I'm trying to write an Nginx config with the following semantics, expressed in hopefully-readable psuedo-config: location /dir1/ /dir2/ { if (matches a .php file) { serve with php } else if ...
0
votes
0answers
284 views

nginx: access to dir only with valid referer that consist of url key and clicked from specific place

i have admin panel, and links to phpmyadmin, munin and other services outside. admin panel generates links like: /admin/custom/pma/key/0ab9686a282bae59e63bda6d59f2cf3d/ and goes out to phpmyadmin ...
0
votes
3answers
334 views

How do I configure my server to forward “domain.com” to “www.domain.com”?

I need to forward all visitors from "domain.com" to "www.domain.com". I know this has something to do with altering the nginx config file but am not sure what to do or what code to use. I am using ...
1
vote
1answer
378 views

How to make nginx remap a part of the URL without sending a redirection?

I have pictures on a path looking like this: /0/1/2/3/4/01234/screenshots/1.jpg The URL to access it looks like this: /static/0/1/2/3/4/01234/screenshots/1.jpg I'd like it to look like this: ...
2
votes
1answer
687 views

Nginx url mapping

Right now I have my website running on tomcat, www.domain:11000/projectName, I am trying to map when the user enters www.domain:10000 (would do port 80 but my ISP blocks port 80 so I use port ...
-1
votes
1answer
827 views

Mask URL part while proxying Tomcat webapp through Nginx

I've got the webbapp at the server 1.1.1.1:8080/AppName/ Now I need to hide port and AppName dir URL part. So I installed Nginx on server 2.2.2.2 with virthost name test.com. Here is the virthost ...
0
votes
3answers
2k views

NGINX Remove index.php /index.php/something/more/ to /something/more

I'm trying to clean urls in NGINX using framework DooPHP. This => - http://example.com/index.php/something/more/ To This => - http://example.com/something/more/ I want to remove (clean url) the ...
2
votes
3answers
664 views

Using nginx and/or varnish to cache server-generated 301 redirects

I'm implementing a sort of url-shortener service. What happens is that I have some backend app server that takes in a request, does some computation and returns a 301 redirected url back upstream to ...
5
votes
2answers
995 views

Django rewrites URL as IP address in browser - why?

I am using django, nginx and apache. When I access my site with a URL (e.g., http://www.foo.com/) what appears in my browser address is the IP address with admin appended (e.g., ...
2
votes
1answer
5k views

nginx- Rewrite URL with Trailing Slash

I have a specialized set of rewrite rules to accommodate a mutli site cms setup. I am trying to have nginx force a trailing slash on the request URL. I would like it to redirect requests for ...