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)

0
votes
1answer
15 views

IIS 8.5 URL Rewrite just wont work: rules have no affect at all

I am trying to set up http to https rewrite in IIS 8.5 using the Rewrite module. Absolutely nothing I have tried has any affect whatsoever. The URL is of the form: http://users-dev.somedomain.com. The ...
0
votes
0answers
12 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 ...
0
votes
1answer
18 views

nginx geoip redirect for first time only leads to redirect loop

I'm trying to configure nginx to perform geoIP checks on first-time visitors only. The idea is that first-time visitors should be redirected to the page version which has been customised for their ...
0
votes
1answer
15 views

Redirect document root within VirtualHost

I am trying to redirect my domain to a new document root if a cookie value is something. I did setup the rewrite and it works fine. RewriteLog "/home/vahur/dev/logs/rewrite.log" RewriteLogLevel 3 ...
0
votes
0answers
16 views

404 Not Found or 500 internal server error using nginx try_files configuration

I'm trying to move my project from Apache to nginx. I use WT-NMP. I'm converting .htaccess to nginx configuration by adding this in nginx.conf. location / { try_files $uri $uri/ /index.php/$args; ...
0
votes
0answers
16 views

LampCMS works as a sub-directory on Apache but fails on Nginx

The Web Application: It is LampCMS within a Wordpress folder. The main web site runs on Wordpress. A requirement made us create LampCMS under this Wordpress site. LampCMS is accessed over a URL ...
0
votes
0answers
30 views

Remove query string from url

We have a magento store which appends a query to our URL when you change Magento store views on the frontend. i.e. http://www.domain.com/?___store=uken Is there a way to remove the ?___store=uken ...
0
votes
0answers
13 views

Trying to disable Apache compression for an URL, but I can't get it to work

I'm trying to disable Apache compression for certain URLs by adding the lines below to .htaccess. I'm trying to get one URL working, but I can't get it to ignore the URL - Apache still renders those ...
0
votes
0answers
9 views

Tuckey UrlRewriteFilter unable to match regex with positive lookahead

This is about Turkey's UrlRewriteFilter I have a rule to convert the first segment of url to lowercase, provided that there's an uppercase letter in it. This is what it looks like: <rule> ...
0
votes
0answers
32 views

IIS 8 Rewrite rule gives me 404 error

I used following Rewrite rule on IIS 8 for asp.net application. But it gives me 404 error when I try to access www.mysiteurl.com/?_escaped_fragment_. If I change actionType to Redirect it redirect ...
0
votes
1answer
20 views

Two URLs, one website, different domains

We have a website running under abc.company.com. We've been asked to make the website available under a different url from a different domain by a customer, let's say stuff.abc.com. They've arranged ...
2
votes
1answer
79 views

What is the difference between Nginx variables $host, $http_host, and $server_name?

What is the difference between the three Nginx variables $host, $http_host, and $server_name? I have a rewrite rule where I'm not sure which one I should be using: location = /vb/showthread.php { ...
0
votes
1answer
23 views

How to use Nginx to both rewrite and proxy_pass whilst keeping the user-entered URL

I'm a beginner Nginx user trying to proxy the following: http://subdomain.example.com/mypage/login TO http://some_ip_address/login (not just /login - the site has other contexts too e.g. /static, ...
-1
votes
0answers
19 views

Postfix Relay address rewrite based on X headers

My situation is unusual I receive emails from an unique address and need to relay them via multiple smtp mailboxes. The way the emails are differentiated is via a custom x-header. I have tried using ...
-1
votes
0answers
25 views

Apache webserver configuration/access to only index.php

I'm trying to the below with Apache/2.4.6 (CentOS) webserver installed using yum. I've got my php pages served from /var/ww/html/project1 index.php is a symbolic link that points to a login page ...
1
vote
0answers
34 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 ...
0
votes
0answers
21 views

rewrite nginx 2 parameters

server { listen 127.0.0.1:80; server_name ap5 www.ap5; root home/ap5/public_html; index index.php index.html; log_not_found off; access_log logs/ap5-access.log; error_log logs/error.log error; ...
-1
votes
1answer
30 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 ...
-1
votes
1answer
39 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
25 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
1answer
28 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 ...
0
votes
1answer
12 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
13 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
19 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
43 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
32 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
21 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
59 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
18 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
34 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
19 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
52 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
91 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
41 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
31 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
56 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: ...
0
votes
2answers
42 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
72 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
32 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
78 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
23 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
77 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
20 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
73 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
56 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
34 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
18 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 ...
0
votes
2answers
179 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
33 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
257 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 ...