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)

-1
votes
0answers
2 views

multiple instances of agedu behind apache2 https proxy

Im using agedu to check for dataages, and i run this daily, and each daily run starts its own webserver on a predefined port. This setup works fine, if not using https. What i would like to do is ...
0
votes
1answer
17 views

Nginx rewrite, removing image dimensions from filename

For instance, if a request is made to an image like so... /static/images/00f37ac6291bb6e8_150.jpeg But the 150px thumbnail version hasn't been generated yet and returns a 404, I would like to have ...
0
votes
1answer
40 views

Using RewriteMap Lookups in a RewriteCond . Possible?

I am trying the following RewriteMap lookup "txt:D:/lookup.txt" RewriteCond %{REQUEST_URI} ^/${lookup} RewriteRule ^/(.*)/(.*)$ /a/$1/b/$2.html [PT,L] I am trying to compare if the request path is ...
2
votes
3answers
2k views

lighttpd config and rewriting/disabling attempts to access favicon.ico

I've got lighttpd and apache working together on an app I'm building. lighty is serving out static content. However, each time a static asset is requested, I see a not found: favicon.ico message in ...
0
votes
1answer
2k views

.htaccess Rewriting Tomcat Server

I am writing a website using Railo. My code is to be deployed on a Railo Server running on Tomcat, overlayed on a regular Apache+PHP server. I need to send all requests to ...
1
vote
3answers
2k 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
2answers
5k 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
4answers
4k 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
16 views

Multiple document root with nginx

I need to configure nginx so it serves a different software from a different document root on a domain's subdirectory as follows: http://example.com/... - main site from /var/www/main ...
0
votes
0answers
7 views

IIS reverse proxy map path to different servers

I am trying to do a reverse proxy based on part of the URL path to different servers: http://server/aaa/ -> http://10.0.0.2/ http://server/bbb/ -> http://10.0.0.3/ etc. so that the aaa part ...
-3
votes
1answer
27 views

postfix From address rewriting

I have postfix version 2.7 running with multi-domain MySQL support. I have created distribution/Aliases for support@example.com which distribute email to user1, user2... etc.. my requirement is when ...
0
votes
2answers
40 views

Redirect page/subfolder to new domain url without changing url in browser

I have been looking for an answer this without any luck (searched everywhere) Basically, I want to rewrite a page (subfolder) to a new domain without changing the url. I've tried with no luck: ...
0
votes
0answers
16 views

Can I set the destination domain for Squid proxy based on subdomain of incoming request?

For e.g. My Squid proxy is hosted on myproxy.com Now if someone makes a request to - onedrive.com.myproxy.com/path?query I want Squid to fetch this request from - onedrive.com/path?query How ...
0
votes
1answer
21 views

nginx rewrite in subfolder

I'm venturing now into nginx rewrite rules so it's a fairly new topic for me. I have in the root folder a series of pages which i use rewrite rules as follows: server { listen 80; ## listen [::]:80 ...
3
votes
0answers
76 views

Multiple Websites on Multiple Servers behind One Public IP

Brief I’m currently working on a project to bring two of our hosted servers (one email, one web) in-house to run alongside our other web server. Hosting one web server is fairly straightforward, but ...
0
votes
1answer
2k 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 ...
0
votes
2answers
22 views

Redirect wildcard subdomain to same subdomain on different domain

I have a domain with dynamic subdomains. The domain, unfortunately, has changed. As such I need to redirect *.domain1.com to *.domain2.com while keeping the subdomains the same. I have looked ...
1
vote
0answers
11 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 ...
0
votes
1answer
1k views

Rewrite all requests to index.php except certain subdirectory requests

I want to rewrite all requests to /index.php, except /css/* and /js/*. This is my original config location / { try_files $uri /index.php$is_args$args; } which works, but lets me access all ...
9
votes
5answers
4k views

Remove “www” and redirect to “https” with nginx

I want to create a rule in nginx that does two things: Removes the "www." from the request URI Redirects to "https" if the request URI is "http" There are plenty of examples of how to do each of ...
0
votes
1answer
20 views

How can I redirect some (but not all) http requests on one IIS host to https on another IIS host?

We have the following requirements: redirect http://host1.example.com/resource1/* to https://host2.example.com/resource1/* (retaining everything including /resource1/* and query strings, etc.) do ...
0
votes
1answer
10 views

IIS Domain is always routing to Domain Root

going to https://www.example.com/about always leads back to https://www.example.com/ How do I stop this while forcing a https://www.example.com/? non-www.htaccess RewriteCond %{HTTP_HOST} !^www\. ...
1
vote
2answers
71 views

301 redirect from non www to www issue [duplicate]

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 ...
0
votes
0answers
33 views

Redirect https back to http in nginx with wildcard domain

I have a top level domain example.com with a SSL wildcard cert attached to it, and a subdomain forum.example.com that I don't want SSL to be used on. My problem is if I enter ...
1
vote
1answer
54 views

Nginx Load Balancing proxy confusion

I'm currently trying to setup a load balancer for a bunch of download mirrors. While reading into this subject I saw Nginx lends itself perfectly as a load balancer, great! But when looking at the ...
0
votes
2answers
542 views

Host Stacey on a nginx server? (convert .htaccess to nginx)

Stacey is a lightweight content management system. I am using it on my porfolio website however it uses .htaccess file to make friendly urls. Is it possible to rewrite this .htaccess lines for using ...
2
votes
1answer
3k views

How to exclude a sub-folder from HTaccess RewriteRule

I have WordPress installed in my root directory, for which a RewriteRule is in place. I need to password-protect a subfolder ("blue"), so I set the htaccess in that folder as such. Problem is that ...
1
vote
1answer
23 views

iptables 'rewrite' requests on a certain port?

Alright, my situation is basically this... I have a box that's acting as a router, with 2 interfaces, eth0 and eth1. eth1 is my uplink, that is it is the interface through which the box is obtaining ...
2
votes
2answers
67 views

any url rewrite rule causes internal server error on iis7

I have iis7 on a Windows server 2008 and iis url rewrite module 2 installed. Any url rewrite rule (in my case a simple canonical domain name rule) causes the webapp to return an error 500. In my ...
0
votes
0answers
28 views

Nginx extensionless PHP rewrite not working

I have been trying to rewrite my php pages so that they display without their extensions in the browser. For example, a link on my server at www.example.com loads a page called about-us.php and in the ...
1
vote
0answers
23 views

nginx rewrite with php interpreter [closed]

First off, Im new to nginx, I'm switching from apache. I setup a server using the ajenti control panel. I got php working just fine. however when I try to do a rewrite rule I get some strange ...
0
votes
0answers
15 views

https apache2 rewrite rule returns loop page

I have a rewrite rule that should redirect (http) membership.newref.php to (https) example/membership.newref.php Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ...
0
votes
1answer
124 views

NGINX rewrite www.example.com -> example.com

I have a problem, this my rule: server { listen 80; server_name example.com; rewrite ^/(.*) http://example.com/$1 permanent; } But Firefox throws error : infinity bounce I want rewrite ...
0
votes
1answer
43 views

Why this nginx rewrite rule add trailing slash?

I've the following rewrite rule on location /, and it enforces trailing slash! location / { rewrite ^(\/.*) https://example.com/ar$1 permanent; } each, time I curl mydomain.com, I got the ...
1
vote
3answers
2k views

How to configure apache as a reverse proxy with the remote server specified in a query string parameter

Problem: I'm trying to configure apache as a reverse proxy where the remove server is specified in a query string parameter. Let's say I'm serving a site at mywebapp.com. If you navigated to ...
0
votes
0answers
25 views

lighttpd: Translate nginx try_files to lighttpd

I'm struggling while translating the following nginx rule to lighttpd: try_files $1 $uri $uri/ /abcdefg/index.php$is_args$args; Can someone explain me, how this would look like in lighttpd? Thank ...
0
votes
2answers
921 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
0
votes
1answer
85 views

How To Force Rewrite and Redirect Url [duplicate]

I have a url: http://domain.com/i.php?c=PT and I Rewrote it to http://domain.com/PT successfully. But When I browse http://domain.com/i.php?c=PT, it wont redirect to http://domain.com/PT. Is there ...
0
votes
1answer
496 views

Nginx Rewrite Rule For File Within Folder Not Working

My problem seems trivial but after several hours of testing, researching and fiddling I can't seem to get this simple nginx rewrite function to work. There are several rewrites we need, some will ...
0
votes
0answers
59 views

Nginx: How to access my reverse proxied sites via separate subdirectories

I have 2 web applications that I want available under http://example.com/demo1 and http://example.com/demo2. My config below correctly reverse proxies to each site, and the site is mostly functional, ...
2
votes
2answers
54 views

Is it possible to replace content on every page passed through a proxy similar to how mod_rewrite is used for URLs?

Is it possible to replace content on every page passed through a proxy similar to how mod_rewrite is used for URLs? I have some pages I am reverse proxying that have absolute paths. This breaks the ...
0
votes
2answers
37 views

Nginx multiple roots

I'd like to divert off requests to a particular sub-directory, to another root location. How? My existing block is: server { listen 80; server_name www.domain.com; location / { ...
1
vote
0answers
34 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
2answers
1k views

IIS ARR/Reverse Proxy 502 Errors for Larger Files

I have an API written in Python which I am accessing with IIS 7.5 via the ISAPI extension PyISAPIe. I thought it would be sensible to separate this API from our main site, so it is in a different site ...
0
votes
1answer
105 views

URL rewrite in IIS 8.5 is not working I'm getting 404 instead

Hi I've configured a rewrite rule on my IIS but it seems like it never gets fired I've been working on this for several hours without any luck this is my rule: ...
-2
votes
2answers
32 views

How can get these NginX try_files to work

I do have a website, which is not Wordpress, and I'm trying a solution for a simple rule. On NginX how can I write a try_files to this case: The link is: http://mywebsite.com/index.php?open=fiction ...
-1
votes
0answers
15 views

Apache Virtual Host Reverse Proxy rewriterule not rewriting everything [duplicate]

The server is being used as a reverse proxy, urls are points at the servers, the server intercepts the URLs and reverse proxies the pages from the IIS servers. The below rewrites some URLs but not ...
-1
votes
1answer
1k views

Apache mod_rewrite to return a 404 except one directory

I'm trying to configure Apache to return a default 404 page when the / of DocumentRoot is called, except for some directories in that DocumentRoot Unfortunately, I'm getting a 404 even for the ...
0
votes
1answer
39 views

How do you prevent mod_rewrite from decoding a string in the path? [duplicate]

I'm trying to create a restful API using mod_rewrite. I have the rule: RewriteRule v2/(.*)$ v1/index.php?request=$1 [QSA,NC,L] However the path could contain base64 encoded strings (i.e. can ...
1
vote
1answer
31 views

IIS Redirect/Rewrite to Host for Specific Subdirectory

As a developer, I'd like to redirect certain (AJAX) requests to a DEV server rather than my local webserver. For Example, redirect request for the subdirectory of "AbcService": ...