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
22 views

Redirect respecting port in the host header?

I'm often working with tunneled ports where I'll SSH forward a remote port 80 to a local port 8080. One of the interesting problems I run into is that when I have a rule like this in NGINX: rewrite ...
1
vote
1answer
29 views

Match … character in rewrite rule with nginx

I have a problem, where someone has added a link to our site - but its getting cut off. I'm seeing in the log file, as: /info-cry%E2%80%A6 Seeing as I know what that is mean't to be going to, I'm ...
0
votes
1answer
13 views

Rewrite subdomains in Nginx

Because I don't want to use CDN anymore I would like to rewrite cdn.example.com to www.example.com. How to do this with Nginx? There is only www.example.com in my server block.
0
votes
1answer
14 views

Using IIS ARR and URL Rewrite to send Webservice requests to a new server

We are trying move our web services from Azure Cloud Services to Azure Web Apps and that would change their address but we have some clients that we are not able to update the address they are using, ...
0
votes
0answers
6 views

nginx rewrite rules for language

the effect I want: abc.com/hello => abc.com/article.php?link=hello abc.com/en/ => abc.com/index.php?lang=en abc.com/en/hello => abc.com/article.php?link=hello&lang=en what I did: ...
0
votes
0answers
10 views

Httpd RewriteMap using QueryString [duplicate]

I'm trying to redirect the following request http://host.com/foo?bar=xxx+aGVsbG8K&other=value to http://host.com/hello?bar=xxx&other=value Where aGVsbG8K is base64 encode version of hello I ...
0
votes
1answer
15 views

apache forward proxy - how to override a destination address?

I'm running apache as a forward proxy to do header injection, URL manipulation, and request logging for some Android apps and I'd need to override the destination for some requests. For example, ...
0
votes
0answers
11 views

iis 7.5 - convert rewrite rules to rewritemaps

I am using IIS7.5 and url_rewrite and I need to rewrite some urls with the following pattern: /departments/oldname1 --> /departments/newname1 /departments/oldname2/oldname3 --> ...
1
vote
1answer
20 views

Redirect rules for .htaccess with mod_rewrite

I have a PHP script dynamically generating content from a database based on queries. The user might do a search from a text box for the username "mark". The content is provided by PHP at ...
0
votes
0answers
31 views

IIS ARR UrlRewrite - Preserve original protocol and port of incoming requests

I'm trying to setup a reverse proxy using IIS with ARR and url rewrite modules. The destination web server host has a website that has multiple bindings for different sites: VM 1 site A - https:443 ...
0
votes
0answers
25 views

Converting NGINX to apache rewrite rules

Currently I am doing a project setup in my local(Apache) whichi is in NGINX. I am facing trouble in converting the rules from NGINX to .htaccess rules. Can some one help me out in converting the ...
0
votes
0answers
12 views

Nginx wordpress redirects

I've been trying to set up some rewrite rules using Nginx for example: location /dir { rewrite ^/dir/foo.php /index.php?pagename=dir&method=foo break; } However I'm always getting a file not ...
0
votes
1answer
22 views

nginx rewrite specific subdomain to nonssl

I have a 301 redirect that writes all subdomains to https. now the client would like to have a http only subdomain. how should i catch this request in the https server and redirect it to http? server ...
0
votes
0answers
11 views

IIS 7.5 ARR 3.0 with subdirectory

I'm trying to work out the best way of sitting two external unrelated services to be accessible through the same url through a IIS reverse proxy as such example.com → default web site ...
0
votes
1answer
24 views

Nginx discards data after number sign (#)

I have existing request which looks like https://smth.ru/smth/GET_DATA?p_DATA_TYPE=arg1#arg2&arg2=XXX I know that is awfully incorrect but I have to work with it. And it worked ealier with ...
0
votes
0answers
20 views

IIS rewrite/redirect rule to make a URL friendly subsite

i'm trying to make a url friendly subsite in IIS, but i'm having troubles defining rewrite/redirect rules: what i'm expecting: Transform these: http://10.28.1.104/portal/v3/main/view ...
0
votes
0answers
36 views

NGINX rewrite IP.Board URLs for Xenforo

I am having a hell of a time getting rewrites working under NGINX to rewrite old URL's to point at a new file. XenForo's forums offer up this config: location /ipb/ { if ($uri ~* ...
0
votes
1answer
24 views

RewriteRule force SSL without WWW

How can i force SSL without WWW # SSL-FORCE RewriteCond %{SERVER_PORT} !443 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] Works but i can also open the site with www. Thanks in advance.
1
vote
1answer
40 views

Remove query strings only on requests requiring PHP (ignoring static files and certain urls)

One of my sites keeps getting spammed with fake URL requests containing query strings. I have caching in place but unfortunately query strings are ignored. Now every time I get a flood of query ...
0
votes
1answer
18 views

How to use rewrite rules in iis and windows authenication

Hi I've got a server with iis, and I've made some rewrite rules for the project I'm working on. They work fine, I've tested them on a development machine and they are all fine. However on this ...
0
votes
0answers
5 views

Apache config with rewrite causes loop [duplicate]

I have to port a WebApp to a new server. On both servers I use the Apache 2.x webserver. I have to redirect every user from m.domain.com/$restOfPath to m.domain.com/mobil/$restOfPath. With ...
0
votes
1answer
24 views

Nginx rewrite issue with sub folder

I'm try to redirect an URL but nothings happen. :( The source URL example like this: http://example.com/download.php?shortURL=MJdcqV Where the MJdcqV is a variable parameter, all others constant. I ...
0
votes
1answer
67 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 ...
1
vote
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
41 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
2answers
23 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/user/dev/logs/rewrite.log" RewriteLogLevel 3 ...
0
votes
0answers
41 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
23 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
91 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
17 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
29 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
42 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
30 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
184 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
30 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
vote
0answers
49 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
26 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
54 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
42 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
51 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
29 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
23 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
16 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
25 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
52 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
47 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
28 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
94 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
21 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
49 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, ...