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
vote
1answer
21 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
15 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
20 views

nginx rewrite with php interpreter [on hold]

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
11 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
44 views
+100

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
33 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
24 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
73 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
32 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
46 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
31 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
vote
0answers
29 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
29 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
20 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
46 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 ...
-2
votes
0answers
11 views

nginx ssl server rewrite request to external url to be http

I have an nginx server configured as a reverse proxy with SSL offloading. The server name is example.com Everything works fine, but there is a form in the webpage that needs to post to an external ...
0
votes
1answer
140 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
47 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
41 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
73 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
25 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
28 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
23 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
43 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
53 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
17 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
31 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
30 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
81 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
36 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
138 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
24 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
14 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: ...
0
votes
1answer
24 views

Nginx rewrite *.domain.tld/page to domain.tld/page

I can not set up a redirect from *.domain.tld/personal to domain.tld/personal server { server_name domain.tld www.domain.tld *.domain.tld; listen 100.10.10.1; set $root_path ...
1
vote
0answers
110 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" ...
-1
votes
1answer
30 views

How to make a RewriteRule on Apache .htaccess to fix a broken image? [duplicate]

My page has: <img src="/?cp_contactformtoemail_captcha=captcha&a=1&b=2&c=image.jpg" id="captchaimg_1" alt="security code" border="0"> But it should be: <img ...
0
votes
0answers
21 views

Rewrite URL to so subfolder points to root in IIS

I have a website which when publish has a URL like: sub.website(dotcom)/sub/Default.aspx Is it possible to change it see when the user navigates to sub.website(dotcom)/ it loads the ...
0
votes
0answers
60 views

How to debug opencart redirect loop?

I'm attempting to redirect an opencart website from http://domain.com to https://domain.com, i have tried the following with different variations: RewriteCond %{SERVER_PORT} !^443$ or RewriteCond ...
2
votes
0answers
40 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 ...
0
votes
0answers
47 views

Nginx redirect or rewrite with folder

I have a virtual machine with an apache which serves a web application at https://my.ip.address/web/index.hml (internal). At the router/firewall is a nginx running which works as an reverse proxy with ...
0
votes
0answers
29 views

IIS Setup Redirect traffic from webserver to app server

I have done quite a few setup which involved hosting applications in IIS and configuring them accordingly, but now I have a different situation ... I have 2 web servers which don't host any ...
1
vote
1answer
131 views

NginX rewrites and absolute resource paths

On my domain, I have a subdomain for Meteor applications, say http://meteor.example.com/ Under this, I would like to put individual applicaions, with an URI for each. Say the meteor application ...
2
votes
1answer
71 views

Nginx redirect to port specified in URL

Is it possible to use Nginx to proxy from a URL like this: http://example.com/service/1234/foo.php?... to an internal service like this: http://example.com:1234/foo.php?... That is, extract a ...
0
votes
0answers
75 views

nginx catchall reurns bad gate way with $host in proxy_pass

I am currently using the following virtual server proxy setup on my development environment the defined virtual servers work fine but i am coming up with a bad gateway error when i hit my catchall ...
-1
votes
2answers
60 views

Nginx rewrite with Server_name as underscore

We have nginx config with server_name as underscore. How do I rewrite from http to https. server { server_name _; rewrite ^/(.*) https://$server_name/$1 permanent; } This returns error as http://_/ ...
0
votes
0answers
54 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, ...
0
votes
1answer
33 views

Ngnix rewrite with catchall server_name

Im trying to do a rewrite based on a catchall server name. So I would like any domain that hits this server for example demo.example.com to be rewrote to example.org?site=demo.example.com ...