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
1answer
8 views

NGINX Url Rewrite for PHP Variable

How would I go about making a url like: http://example.com/test123 go to a url like http://example.com/?code=test123 My server runs Nginx, and a lot of the documentation on the web is for ...
0
votes
1answer
29 views

Two get parameters rewrite in subfolder

I have a site on domain.de/webinterface/. There is a index.php with two get parameters (page & user) Now i want that domain.de/webinterface/user/Niklas redirects to ...
0
votes
0answers
11 views

Haproxy and rewrite rules issue?

I have HAproxy listening on port 80 to send requests to a node server (port:3000) or php server (4000). The following rewrite rules should add a trailing slash to any url that is pointing to an ...
-1
votes
0answers
24 views

URL rewrite from subdomain to page with variables [duplicate]

I have been searching for an answer to this for a while and haven't been able to find anything that works for me. I'm new to the .htaccess file and URL rewriting so maybe it is there and I'm just ...
-1
votes
1answer
25 views

Apache rewrite is appending /www [duplicate]

the domain example.com points to an IP address different than www.example.com, but when people to put in the domain name I want them redirected automatically to the Web server. there is an Apache ...
-1
votes
0answers
8 views

htaccess rewrite rule to rename image [duplicate]

I will create a SEO-Friendly Picture Name but use a static filename in background. Maybee I do something wrong because I got 404 error. I will call: http://static.mss.de/images/test/frosch_1_1.jpg ...
0
votes
1answer
8 views

IIS Url Rewrite, Localhost Only (missing files and folders)

We work with websites that are occasionally copied into a local environment for routine debugging, etc. These sites have lots of user generated media - specifically images. To avoid downloading all ...
0
votes
0answers
12 views

Nginx alias, with query vars

0 down vote favorite I have a directory alias, with the next configuration location ^~ /sub-site { alias /usr/share/nginx/html/sub-site/public; try_files $uri $uri/ @sub-site; location ~* ...
0
votes
0answers
10 views

IIS Url Rewrite rule that handles multiple domains

I apologize in advance for being a bit of a newb with this but I'm looking for some advice. I have an upcoming site launch that will need to redirect requests from about 40 different domains to one. ...
0
votes
2answers
35 views

Nginx remove everything after subdirectory

Tried searching on the forums for an answer but I'm quite stuck... I have a page called course which used to have a load of sub pages but now I need all requests for those subpages to redirect back ...
0
votes
1answer
22 views

Allow Parent .htaccess to redirect all assets

We're migrating from one subdomain to another. This particular domain has a subset of several websites. I've setup the following rewrite to handle the redirect globally: In docroot/.htaccess ("Rule ...
0
votes
0answers
15 views

ngx_http_rewrite_module does not work under https schema

Why rewrite ^/location/(.+)/?$ /destination/$1 redirect; works under under "http" schema, but it does not work under under "https" schema?
1
vote
2answers
48 views

How do you Mask URLs in HAProxy?

Is there any way to do URL masking in HAProxy? I'd like to have a URL directing to my load balancer, i.e. www.example.com, redirect to another URL I have for another application. However, I'd like the ...
1
vote
0answers
15 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
votes
1answer
25 views

Nxginx rewrite url without redirection

I would like to know if it's possible and how to rewrite an URL without redirection using nginx as web server. To be more precise, what I want is that when someone access to www.mydomain.com/auctions, ...
0
votes
0answers
13 views

How do I set up a rewrite rule in IIS 8 so that all traffic points to https://www.*.com from http://*.com?

I have the following root level URLs where people could possibly go: http://example.com http://www.example.com https://example.com https://www.example.com How can I ensure that 1, 2, and 3 always ...
1
vote
2answers
33 views

IIS URL Rewrite Outbound rule server variable explanation

I have the following code-snippet for IIS. <configuration> <system.webServer> <rewrite> <rules> <rule name="HTTPS_301_Redirect" stopProcessing="true"> ...
1
vote
2answers
65 views

Rewrite url with fastcgi in nginx

I have a working php fastcgi config in nginx. Now I have few requests to handle such as /X.php by /X, /Y.php by /Y Sounds simple so I wrote the following for testing: rewrite ^/X.php$ ...
0
votes
0answers
31 views

Nginx redirect index.php/blog to blog

I've got my Nginx up and running and setup a Magento as well according to the Magento Nginx guide over there: ...
1
vote
1answer
27 views

Using query string to redirect/rewrite to different internal IIS sites

I have an Azure VM that is hosting a web application. The application will be accessible via the VM's IP address: http://191.238.112.62 I want to be able to use query strings to redirect to ...
0
votes
1answer
38 views

Nginx redirect folder to subdomain

I'm trying to configure a redirect on Nginx from a folder to a subdomain. I've tried already Nginx redirect: folder to external domain and Nginx rewrite rule (subdirectory to subdomain) and nginx: ...
-1
votes
0answers
18 views

How to add a trailing slash within magento's URL structure?

You see, I have a magento site and this is what i want to do. This is the current url structure: site.com/magento-page-1 This is what i want: site.com/magento/page-1 Now, "magento" wont be a ...
0
votes
2answers
37 views

Nginx Rewrite and Redirection Same Time?

I have arcade gaming web site. I want to convert my urls to sef. category : example.com/index.php?category=mario-games > example.com/category/mario-games game details : ...
0
votes
2answers
37 views

IIS URL Rewrite 404 Error

I am running a small intranet site off Windows 7 and IIS and I have a page page/LoadPage.aspx which is an ASPX container page for displaying a requested page, e.g. ...
0
votes
0answers
20 views

Mask subdomain.mydomain.com to sub-directory

I have a wordpress site: instano.wordpress.com. Now I want to host it in my sub-directory, as www.mydomain.com/blog i.e. my users should see the URL: www.mydomain.com/blog/... I have a nginx-unicorn ...
1
vote
1answer
68 views

How to remove a GET query key in NGINX and use the GET value as the URI?

I have an email verification script that looks like this: http://example.com/v/index.php?t=TOKEN_EMAILED_TO_CLIENT And I want it to look like this: http://example.com/v/TOKEN_EMAILED_TO_CLIENT ...
1
vote
0answers
20 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; ...
2
votes
1answer
58 views

HAProxy/Varnish: redirecting a percentage of traffic

I'm trying to measure separate statistics for two different versions of a web page. So I need to redirect a certain percentage of my web traffic to a different page than the one requested (i.e. 20% of ...
0
votes
0answers
18 views

Apache2 Rewrite Rule - set a default directory

I'm trying to configure my Apache2. At the moment, when a user navigates to: http(s)://eamorr.com/whatever/ he is served pages from the directory /home/eamorr/eamorr.com/www/whatever (the "www" ...
0
votes
1answer
56 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
49 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
28 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
15 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
32 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
98 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
28 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
1answer
160 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
55 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
25 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
27 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
33 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 ...
-1
votes
1answer
49 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
84 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
28 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
38 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
29 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
29 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
91 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
53 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
34 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 ...