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)

6
votes
0answers
7k views

How to use IIS URL Rewrite with gzip compression

I've been trying to create outbound rules in IIS 7.5 on Windows 2008 R2 on a site that has static HTML pages and compression enabled. If I have any form of compression enabled (static or dynamic) I ...
4
votes
0answers
845 views

FallbackResource in subdirectory

I manage a large number of PHP applications using front controllers and the following htaccess file: FallbackResource /index.php Yes, that is the entire file (for each application)! However, a few ...
3
votes
0answers
666 views

nginx equivalent to Apache MultiViews?

If you put this in your .htaccess file Options MultiViews and you have these files stuff/ howto.html index.php items.php then all of these web addresses work /stuff/ # ...
2
votes
0answers
74 views

Combined redirects in Nginx

We are using Nginx and want to reduce the number of "chained" redirects we have. So, for example: URL A - http://www.sitename.co.uk/SHOPPING-CATEGORIES/product_name redirects to its https version ...
2
votes
0answers
440 views

Is websocket reverse proxy possible with IIS 8.5 & URL rewrite 2.0?

I installed Tomcat as a java app server behind IIS. Using the following rules I can rewrite static pages just fine, but alas, websocket connections are never established: <?xml version="1.0" ...
2
votes
0answers
96 views

Apache rewrite works under FreeBSD, not under CentOS

I have 5 production servers which are running FreeBSD 9.2, but we are planning on transitioning to CentOS. Because of this, I am attempting to set up some virtual machines to emulate our production ...
2
votes
0answers
200 views

Delayed requests when using ARR with IIS 8.0 on Windows 2012

I've got a setup on Windows Server 2012 R2, using IIS8.0 which passes certain requests through to a custom backend using Application Request Rerouting. The backend is only listening on IPv4 on port ...
2
votes
0answers
119 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 ...
2
votes
0answers
2k 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 ...
2
votes
0answers
471 views

nginx/php + zurmo, rewrite or internal redirection cycle

I am trying to get Zurmo CRM running on my Debian Jessie system on localhost. I couldn't find an example nginx config and the application needs to rewrite URLS, which I have done wrong. I also use ...
2
votes
0answers
227 views

URL Rewrite in Apache + Tomcat set up with change in web application context

How to make URL http:/hostname:8080/abc?func=ll point to the URL http:/hostname:8080/xyz?func=ll automatically. Set up is Apache behind which Tomcat is present. Application "xyz" is deployed on ...
2
votes
0answers
280 views

mod_rewrite: internal rewrite to (fake) clean URL not possible.

This is more a why question. I'm using a CMS that handles clean URLs via mod_rewrite out of the box. Website has a section /accessories that now has to be renamed to /store. Being on lazy mode, I ...
1
vote
0answers
19 views

nginx prevent loss of POST parameters when rewriting uri

I would like to do some url rewriting on nginx with php-fpm. Namely, routing all requests to php scripts to a single script like: /index.php?fulluri=(originaluri) Many ways to approach the problem: ...
1
vote
0answers
23 views

forward proxy with URL rewrite

Apologies if this is a newbie question -- I can't believe its hard, so I must be missing something. I have an application at https://example.com/application/* . It makes use of PNGs sourced from ...
1
vote
0answers
21 views

Copy PHP website to virtual folder under IIS 8.5

I would like to make an existing PHP Website (Apache) run on a virtual folder under IIS 8.5. With the help of some nice online tools I translated the following .htaccess content: <IfModule ...
1
vote
0answers
31 views

Apache rewrite rule 403 error

I'm running Apache 2.2.15 with rewrite_module installed. I have rule in my vhost.conf as follows; RewriteRule \n ^/advanced/selector/profiles/([A-Za-z0-9]+)/?$ \n ...
1
vote
0answers
85 views

Apache exit signal Segmentation fault when mod_rewrite and fcgi are used together

I am using Ubuntu 15.04, Apache/2.4.10. I enabled mod_rewrite and mod_proxy_fcgi. My apache config for fcgi is: ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/myapp/$1 ...
1
vote
0answers
22 views

mod_rewrite and double slash issue

I am getting mod_rewrite and double slash issue can you please help me out. # ProxyPass /balancer-manager ! RewriteRule /phoenix/^(.*) ...
1
vote
0answers
54 views

Nginx url rewrite stops going through location code

I'm trying to configure my Phalcon (php framework) project on Nginx. Unfortunately I can't manage to make the rewrite work. In order to better understand my problem please check out the config file: ...
1
vote
0answers
71 views

How to SOAP over a proxy server I own(configuration)?

I have a server called http://SERVER-A.com which sends a SOAP request to a third-party address. Also I have another server called http://Server-B.com which I want to configure as a proxy server. I ...
1
vote
0answers
19 views

Make Varnish check for html static before serving

I was thinking of writing some logics to my application so that it can write the static page content to s3 or some CDN and serve primarily from there. But am not sure if this is possible. For ...
1
vote
0answers
89 views

nginx proxy_pass adds port number to URL

I have a standard Rails app deployed to Heroku. I am using custom buildpacks to install nginx so I can create some rewrite rules and a reverse proxy. I have it mostly working save for one issue. I ...
1
vote
0answers
187 views

captive portal / walled garden on pop up window on android not appearing

I don't normally ask for help, but i've been stuck on this for a couple of days - and any pointers anyone may have will be very much appreciated. I have created a wifi hotspot (captive portal / ...
1
vote
0answers
24 views

Converting lighttpd rewrite rules to apache

I'm in the process of converting an application from Unix to a Windows based infrastructure, one of the changes being made is utilizing apache instead of lighttpd for the web server. Most of this ...
1
vote
0answers
71 views

Nginx rewrite rules for all vhosts

I have a huge referer blacklist with that I want to stop referer spam on all my websites (https://perishablepress.com/blacklist/ultimate-referrer-blacklist.txt). Currently I have to change all my ...
1
vote
0answers
26 views

Converting .Htaccess Rewrite Rule to Nginx

I have the following apache rewrite rule which I am trying to convert to work with nginx. RewriteRule ^(.*)\/(.*)-(\d{4})(?:-(.*))?$ album.php?artist=$1&album=$2&releaseyear=$3&extra=$4 ...
1
vote
0answers
49 views

WordPress Nginx Browser Cache Expires on Extentionless URLs

Struggling a bit with the following. Adding expires for JS and CSS, plus other static files is easy: # Directives to send expires headers. location ~* \.(?:css|js)$ { expires 28d; ...
1
vote
0answers
119 views

Distinguishing called URL for response rewriting for tomcat app via IIS ARR reverse proxy

Hi to the community at Serverfault! I have an issue while trying to configure my IIS to open the respective manager APP on two Tomcat Servers on the same machine. When I call the sites directly via ...
1
vote
0answers
98 views

Special nginx hotlink protection conversion from Apache .htaccess rule

I have the following anti-leeching rewrite rule in Apache, which i'd like to have in nginx. I see cookie or referrer rule examples. But none combining both, so I am not sure how to go about this. ...
1
vote
0answers
78 views

IIS URL Rewrite to act as 404 handler

How can I use the URL Rewrite module in IIS to mimic a generic 404 handler? It is easy enough to set up rewrite rules that match a specific pattern, but what I want to do is to set up a rewrite rule ...
1
vote
0answers
213 views

IIS Reverse proxy and URL Rewrite don't work

I did following steps: Installed all neede features to IIS (URLRewrite 2.0, ARR, ...) Created default MVC Web Application in VisualStudio Added this web app as new site to iis (I can access it by ...
1
vote
0answers
151 views

Rewrite a url to a a new URL and then send the new URL to a PHP script

I have URLs that contain a cache busting string. I want to rewrite these URLs without the cache busting string, and then send the rewritten URLs that match a certain criteria (e.g. audio/video files) ...
1
vote
0answers
299 views

Nginx restful url rewrite

I need to rewrite URL like this: example.com/demo/test/123/edit To: example.com/demo/test.php?a=123&b=edit It works with this rewrite rule: location /demo { rewrite ...
1
vote
0answers
50 views

Apache rewrite rule for multiple named virtual hosts with a 'catch all' rule

I have a redirect apache server that I setup for about 30 domains. I want to have all requests get redirected to the main server except for 1 domain. Basically any domain coming to this server gets ...
1
vote
0answers
78 views

NVA: rewrite before or after Varnish?

I'm planning an NVA server system (Nginx-Varnish-Apache), where request are routed through in that order. Apache would be serving WordPress CMS or similar. I'm wondering where to apply additional ...
1
vote
0answers
47 views

Apache2 mod_rewrite, handling the optional “/” at the end of a URL

I am attempting to host a single custom page to set as my homepage on my server. The real path to the page is example.com/start.html. However, I do not want this ugly URL in my homepage so I am ...
1
vote
0answers
301 views

IIS 7.5 URL Rewrite domain redirect

I am trying to figure out why the following code does not work. This is a copy of my web.config file: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> ...
1
vote
0answers
90 views

Complex IIS URL Rewrite

I've beat my head against Google trying to get this to work, but I suppose I just don't fully understand the rewrite engine or I stink at regex. Here's my scenario, though. I'm using IIS 7.5 with URL ...
1
vote
0answers
90 views

apache rewrite through proxy remote

We are trying to write a reverse proxy rule to an external site. ProxyRequests On ProxyRemote https://abc.company.com http://proxy.company.com:80 ProxyPass /_vti_bin/AccountList.asmx/ ...
1
vote
0answers
31 views

How do I remove a segment without affecting another

Looking for help creating an IIS rewrite rule. We have a distributable product that is installed in an unknown base url We want to block /app and do so using: <remove segment="app"/> ...
1
vote
0answers
84 views

IIS rewrite rules for subdomain and nonexistent files

Setup: I know how to use a rewrite rule to route urls to a routing script such as router.php. I know how to use a rewrite rule to route urls containing a subdomain to subfolders in the document ...
1
vote
0answers
27 views

Setting a bail out proxy based on HOST header

We have set up a proxy during our migration phase and saw that people try to abuse it. It is correctly configured and forward only to our application server but these trials charge our main server. ...
1
vote
0answers
118 views

Setting up nginx, rewrite and fastcgi

This problem has been driving me nuts for the last couple of days... Working on an application that needs authentication and exists of different parts (CMS, API, frontend) we ran in to some problems ...
1
vote
0answers
68 views

How to convert RewriteCond rules so they work in Lighttpd?

How can I convert this Apache rewrite rules so they work on Lighttpd? This is in fact a .htaccess file, and I need to put those in a lighttpd.conf file. Options +FollowSymLinks RewriteEngine on ...
1
vote
0answers
239 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 ...
1
vote
0answers
408 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 ...
1
vote
0answers
406 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 ...
1
vote
0answers
74 views

Redirect subfolder to subfolder and remove subfolder via nginx

I'm trying to redirect a subfolder to another subfolder with nginx. The hard part is removing the target subfolder from displaying, as it's a ruby app and not a true root folder. They are both on the ...
1
vote
0answers
484 views

Possible bug in IIS url rewrite module or is it just me?

Okay, so I came up with the brilliant idea to run a W2012 IIS8 with rewrite rules to do some reverse proxying for me, not because it's the best choice, but because I didn't want yet another box ...
1
vote
0answers
406 views

IIS Reverse Proxy to a Jetty Server

I have an application that I have to do some integration with that is using the Jetty web server. The company that makes the application gave me instructions on how I could use IIS to act as a reverse ...