URL Rewriting maps an incoming URL to a modified URL, so that the request is processes as if the original request was made to the modified URL. This is often used to provide more search engine friendly URLs.

learn more… | top users | synonyms (5)

2
votes
0answers
67 views

Weird nginx configuration: multiple rewrite rules doesnt work

I have an application which knows how to prepare some special images and its running on a separate machine (i'm trying to use it as image server). When these images are prepared and served by ...
0
votes
1answer
466 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 ...
0
votes
0answers
111 views

Rewriting a proxied upstream

I have a server which serves LuCI for me on localhost:8080. I'm trying to proxy to it via nginx, but I'd like to rewrite the URLs so that instead of https://myserver/cgi-bin/luci, I have ...
0
votes
1answer
48 views

Redirect in nginx with extracting params from the url

I have a very long url's like: https://mydomain.com/post/api/v5/apps/123/events/viewitem?data={"h_Authorization":"Basic ...
1
vote
0answers
139 views

Getting error 500.52 when creating reverse proxy with url rewrite

I have used the following technique for achieving Url rewriting. http://weblogs.asp.net/owscott/archive/2013/10/24/creating-a-reverse-proxy-with-url-rewrite-for-iis.aspx However i am getting the ...
0
votes
1answer
310 views

nginx reverse proxy fix remote url

I have a wordpress site on different machine behind nginx reverse proxy. The remote host is 10.0.1.1/kehitys/testi/wordpress and I would like to serve this out as www.host.com/. Is there some way to ...
0
votes
1answer
135 views

NGiNX and MediaWiki rewrite regular expression

I am having some problems with regular-expression with rewrite in NGiNX. Here is my config: location /wiki/ { rewrite ^/([^?]*)/([^?]*)(?:\?(.*))? /$1/index.php?title=$2&$3 last; ...
0
votes
2answers
680 views

How to redirect or rewrite IIS site with port in URL to URL without port?

I'm not 100% sure if this is the right part of StackOverflow to post this but to me it made the most sense. Sorry if its not! Currently I have a site in IIS configured on HTTPS with port 7500. I can ...
0
votes
0answers
28 views

Nginx rewrite to fixed destination link

I would like to rewrite all incoming links to a fixed destination link. Any arguments and URI paths should be dropped, so http://domain1.com/blah/blah.html?test=3&test2=4 should always become ...
0
votes
0answers
59 views

Nginx reverse proxy forces 301 on subdomain (and it shouldn't)

So I'm using Nginx (1.4.3) to reverse proxy a domain and sub-domains. I installed SSL certs to handle the main domain (example.com) and a couple sub-domains (lets say test.example.com and ...
0
votes
0answers
158 views

Nginx not passing rewrite to FPM

Here are the pertinent lines of my nginx.conf file. location / { try_files $uri $uri/ /index.php @rewrite; } location @rewrite { rewrite ^/customer/(.*)$ /customersDisplay.php?id=$1; ...
4
votes
2answers
2k views

Temporarily redirect *all* HTTP/HTTPS requests in IIS to a “server maintenance” page

We've got an IIS server that hosts hundreds of separate web apps, and the physical database server that hosts these apps is going to be taken offline for maintenance for a brief period (we expect it ...
2
votes
0answers
115 views

How to organize millions of static files to serve efficiently over the web?

I'd like to create a service to serve several hundred thousand smaller files (from 5kb to 500kb, mostly around 10-100kb). Think of it as a kind of gravatar.com which serves those little avatar pics on ...
3
votes
1answer
57 views

Multiple rule Apache rewrite

I am trying to set up a hierarchy five levels deep with mod_rewrite. This is what I have put together at this point. It works for the last two levels (the first and second rule) but not after that. ...
1
vote
0answers
122 views

How to rewrite using htaccess if the file exists in another folder?

We are trying to rewrite to another folder if the file does not exist in the document root, but does exist in the other folder. The other folder is in a completely different location, which is ...
0
votes
1answer
362 views

How to forward to Amazon S3 when in maintenance mode with nginx using 503?

During website maintenance, it is sometimes necessary to shutdown our website. Our current method is to touch a file which will trigger the web server (nginx) to redirect traffic to a maintenance ...
0
votes
0answers
24 views

How can I use AAR and RewriteModule to proxy AJAX requests?

Using IIS 7.5 with Advanced Application Routing. I have setup a rewrite rule so that all requests to http://server1/proxy/* goto http://server2:8080/* eg: a request to ...
1
vote
2answers
373 views

Apache2 mod_rewrite + userdir

I have an Ubuntu Server (web) with the following configuration Version: 13.10 Installed: Apache2, apache2 utils, php5 Enabled: rewrite, userdir Problem When I try to use rewrite rules, for example ...
0
votes
1answer
462 views

How to explicitly apply percent escapes to a URL in nginx?

I have the following configuration: location ~ ^/((index\.php|robots\.txt|admin|static|uploads|api)(/.*)?)$ { proxy_set_header Host $http_host; proxy_pass http://localhost:1337/$1?$args; } ...
0
votes
1answer
531 views

Apache misbehaving (returning 404s)

CentOS 6.4 64-bit Apache 2.4.6 PHP-FPM 5.5.4 Homepage from root loads fine http://csillamvilag.com But all other pages return 404 (CMS is WordPress). I am also able to access and log into WordPress ...
0
votes
0answers
39 views

nginx to lighttpd detecting request headers

I'm moving a site form Nginx to Lighttpd. I was able to move everything except these nginx rules set $enc_type ""; if ($http_accept_encoding ~ gzip) { set $enc_type .gzip; } if (-f ...
0
votes
2answers
285 views

Conditionally Rewrite Email Headers (From & Reply-To) Exchange 2010

I have a client who maintains Company A (with email addresses %username%@companyA.com) and they own the domain companyB.com however there is no "infrastructure" (no Exchange server) set up ...
0
votes
1answer
124 views

Nginx upstream returning port - How to rewrite $host?

I am using Nginx and am using proxy_pass to proxy through to upstream application server. This is working fine, however the server responds with https://domain.com:81/ How can I rewrite the host from ...
2
votes
2answers
2k 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
307 views

IIS7 URL Rewrite - Checking for X-Forwarded-For header

I am pretty familiar with IIS and URL Rewrite but I just got a task which stumped me. I need to check each request for the presence of the X-Forwarded-For HTTP header and, depending on its presence, ...
1
vote
0answers
188 views

nginx codeigniter rewrite: Controller name conflicts with directory

I'm trying out nginx and porting my existing apache configuration to nginx. I have managed to reroute the codeigniter url's successfully, but I'm having a problem with one particular controller whose ...
0
votes
2answers
53 views

301 redirect from non www to www issue

I have been trying to set a 301 redirect from a non www to a www domain since yesterday but it only cause problems on my site. I first tried it from the control panel of the website, then by modifying ...
1
vote
3answers
4k views

Nginx redirect one path to another

I'm sure this has been asked before, but I can't find a solution that works. A website has switched CMS services, but has the same domain, how do I set up an nginx rewrite for a single page? E.g. ...
0
votes
1answer
84 views

Getting “negotiation: discovered file(s) matching request:” error not sure why

I'm currently trying to transfer a site to a new server running Ubuntu 12.10. The site worked fine on the old server, however, the new server is giving me some problems. When I access the site, I get ...
0
votes
1answer
55 views

Apache2: Trying to map a subdomain to a subdirectory

So basically I want to have: sub.domain.com/anything -> domain.com/asub/anything I'm a bit new to this and a bit confused. The first thing I did was configure my DNS settings so sub.domain.com goes ...
0
votes
0answers
90 views

IIS Url Rewrite Capturing query string and escaping characters

We are just adding some redirects for an old site to a new one in IIS7 using the URL Rewrite 'plugin'. The old site's URL are all based on the query string, we'd usually do explicit rewrites like ...
1
vote
1answer
310 views

Nginx rewrite with Simple Machines Forum

I am running Nginx 1.5.6 and I use the Simple Machines Forum software. Most rewrite rules seem to work properly, with the exception of the RSS feeds. In my Nginx configuration, I have the following ...
0
votes
0answers
108 views

How to set “retry-after” when using IIS Url-Rewrite to deliver a 503 message

I have used the Url-Rewrite suggestion by @Peter Hahndorf [answer here] to great effect. However I was wondering if there's a way to also tell search engines to "Retry-After"? I've tried ...
0
votes
1answer
270 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 ...
0
votes
3answers
1k views

Apache > 2.2.22 rewrite rule not working?

since yesterday I'm trying to figure out how to fix the following: running phpipam (http://www.phpipam.net/) with WAMP (Windows environment). The problem I am facing is related with RewriteRule ...
0
votes
1answer
106 views

Server remembering old rewrite rules, even when I remove htaccess

I have set up a development server with Ubuntu and LAMP, but for some reason the .htaccess is acting strange... There is a site on there with a set of rules, when I comment them out they still work, ...
-2
votes
1answer
75 views

Rewriting .php extension to .png

I am quite new to Nginx, so my apologies in advanced for any messups. I am trying to rewrite my script titled 'test.php' to 'test.png', so when you go to 'test.png', it displays the php content, ...
1
vote
1answer
34 views

Ningx rewrite for specific dir

I have to admit I am completely new to WebServers and now try to figure out how to configure my nginx (for home-purpose). I have already running a web-service rutorrent on my nginx with the default ...
0
votes
0answers
56 views

htaccess Rewrite leading zero in url causing trouble

I have a database with a string column made up of four unique digits attached to each record. I know this isn't the best way to do this but I'm kind of stuck with it. I'm trying to rewrite urls from ...
0
votes
0answers
49 views

Apache Rewrite Rule that Updates Query String Case

I have been looking far and wide for help with this but am not able to get a Query String-based rewrite to work. I want saas.site.com/shop-accesories.html to redirect to ...
1
vote
1answer
18 views

Rewrite Rule for modifying URL structure

I am trying to create a mod rewrite rule to correctly change an existing url structure that looks like this: Old: ...
0
votes
1answer
168 views

Nginx - Rewrite Domain to Domain with full URL

I need to setup nginx to rewrite "www.test.com" to "www.new-test.com/test/test?foo=bar&bar=foo". I've tried the following code: server { listen 80; server_name test.com www.test.com; ...
1
vote
1answer
1k views

Squid url_rewrite_program is not working

I'm writing a url_rewrite module for squid in python (OS: Ubuntu 13). For now the code is just a test which should print the received stdin to a file: #!/usr/bin/python import sys,os url = ...
0
votes
2answers
3k views

nginx rewrite rule to convert URL segments to query string parameters

I'm setting up an nginx server for the first time, and having some trouble getting the rewrite rules right for nginx. The Apache rules we used were: See if it's a real file or directory, if so, ...
0
votes
1answer
60 views

nginx, php and urls with php files in them [closed]

I've just done an install of moodle and it's using urls like this for its theme: http://moodle.example.com/theme/styles.php/standard/1380191797/all nginx isn't picking up that that's a call to a ...
-1
votes
1answer
80 views

Nginx redirect sub.domain.com/users/page/somename to somename.sub.domain.com

I've been trying to redirect http://sub.domain.com/users/page/somename to http://somename.sub.domain.com etc. Any pointers?
1
vote
0answers
416 views

URL rewrite doesn’t work for magento

Web Server Rewrites in admin is set to yes. Secure and unsecure URLs do not have index.php in them. mod-rewrite is enabled and works I tried all combination with RewriteBase / in htaccess Flushed ...
0
votes
1answer
595 views

RewriteBase rule works in .htacess, but not in httpd.conf (inside <Directory …>)?

Let me explain by example... File: /var/www/example.com/public/wp-content/cache/minify/.htaccess <IfModule mod_rewrite.c> # THIS WORKS... RewriteBase /wp-content/cache/minify/ ...
0
votes
0answers
53 views

nginx + fastcgi No input file specified. when rewrite link

I am migrating from apache to nginx and am stuck at a rewrite issue. php pages are working fine, only when I access the seo friendly link I get No input file specified. For example ...
0
votes
1answer
53 views

Non-working nginx rewrite rule with multiple params

I'm trying to create a rewrite rule with nginx which rewrites a non-existent image uri to dynamic page with params but failing. /images/395.4b2a-c6b.large-red/car-image.jpg to ...