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
4 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 ...
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
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
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
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
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
11 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\. ...
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
0answers
34 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 ...
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 ...
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 ...
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
1answer
44 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 ...
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
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
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 / { ...
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 ...
-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
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. ...
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": ...
0
votes
1answer
22 views

Rewrite rule for specific domain with language (domain.de, domain.com etc.)

I have web application which is accessed via two URLs: domain.com/en/param/param domain.com/de/param/param Is it possible to create a virtual host for a language-specific domain like ...
0
votes
1answer
72 views

nginx config - replace/rewrite all dead links on a page. Add prefix to the uri

I want to inject "project name" to every link on a web page. Example: link and site http://localhost/osqa/ is working, but when I'm on the osqa page, all links are directing to localhost directly ...
0
votes
1answer
212 views

Nginx how to run shell script on page load via lua module os execute and then serve directory listing?

So I have a bash script that I want to execute/run on each "page load" of url so that it will modify (creating symlinks) to a /public/html/ folder that I want the server to then serve. The problem ...
0
votes
1answer
58 views

Using nginx or mongoose or mongrel or other tiny web server, how to serve certain files from subdirectories as from one root or top level directory

I have a directory structure let's say of /user/me/project1 /usr/me/project1/private/stuff /usr/me/project1/whatever/bla/bla /usr/me/project1/pdf/bla.pdf /user/me/project2 /user/me/project2/priv1 ...
-1
votes
1answer
48 views

nginx rewrite faux image to PHP [closed]

Working on using nginx to serve images. static.foobar.com/UUID.jpg url will actually serve as a pointer to a PHP script which determines if you have permission to view that image (and if so, serve ...
0
votes
1answer
106 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: ...
0
votes
0answers
35 views

Forms authentication with URL rewriting

I've got forms authentication set on the top level of my site via the web.config, and I also have a URL rewrite rule to go from mysite.com/plex/ via a reverse proxy to another localhost server; ...
0
votes
0answers
49 views

Azure IIS: Enable Rewrite to achieve subdomains and 404 on images an scripts

I'm desperately trying to make my Azure Web App accessible via subdomains. It seems that I cannot map multiple subdomains on Azure for each Virtual Application/Folder of my shared Web App instance. I ...
1
vote
2answers
26 views

Trying to rewrite /directory/dir_variable/ to /directory/dir_variable/index.php

I'm trying to rewrite something like this: domain.tld/staging/base_1/ to domain.tld/staging/base_1/index.php where '1' is a variable number. but am getting a redirect cycle. *1 rewrite or ...
0
votes
0answers
68 views

Squid: bypass url_rewrite_program when request is https

I have a url rewriter working in squid currently. The problem is that, while it works fine for HTTP, HTTPS requests obviously don't work, even when rewritten with the same URL (because my server would ...
0
votes
1answer
55 views

nginx: regex not working on url rewrite

I have http://sample.cervo02.com. i'm trying to get https://cervo02.com/sample. I tried couple of redirect none of them are working. rewrite ^([^.]*)$ https://cervo02.com/$1 last; return ...
1
vote
1answer
19 views

Postfix deliver mail for orginal destination + BCC - but only for one email

I have postfix with virtual users, I'm looking for solution, tried google it, but no luck. I want to achieve this one: mail for admin@* should be delvered to admin@* and BCC for webmaster@* I ...
0
votes
0answers
38 views

Apache URL Rewrite On the same Virtual Host works in one case but fails in another

I have an odd problem, where I am rewriting a URL to proxy to two different URL destinations, based on digits that are passed in the URL and a particular string, in the same virtualhost definition, ...
0
votes
1answer
35 views

How To …IIS, Reverse Proxy, URL Masking, Outbound .?

Here is the background On our website there is a a search function which communicates with Google Search Appliance (GSA). When the user lick on search it sends the request to ...
0
votes
0answers
117 views

ARR and URL rewrite for node express website for iis server

I have an express.js website running on my localhost in my Webserver (IIS8.5). When I use ARR and url rewrite to point to localhost port 3000 where my express website is, I can access part of it from ...
0
votes
0answers
40 views

Nginx rewrites & passing PHP request to Apache efficiently

I'm in the process of moving my rewrites off Apache and including them in Nginx instead. The code below appears to be working fine, but is this the most efficient way of doing it? Also, what if I ...
1
vote
1answer
181 views

Set Access-Control-Allow-Origin Header for specific URL that has a Query String

I'm asking this here as a last resort after trying different things / asking google / reading http://httpd.apache.org/docs/2.2/ I have the following in my apache2.conf # Allow cross domain fonts ...
0
votes
0answers
13 views

server farm configuration for redirect and reroute [duplicate]

I have a windows server 2012 at home and I want to redirect specific requests to different machines in my network. How can I configure, for example, all requests for www.sample01.com to go to ...
0
votes
2answers
28 views

Nginx rewrite rule for CDN

I am struggling with converting an Apache rewrite rule to Nginx. The rule lives inside WEBROOT/cdn/.htacces and reads: RewriteRule ^[0-9]{1,6}/(.*)$ ../$1 [PT] The goal of it is to take a URL like: ...
0
votes
1answer
15 views

Rewrite rule for custom parameter

I need to write a rewrite rule that will do the following: When user enters mysite.com/whatever, this address will stay in the browser but in the background following address will be called: ...