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
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
1answer
19 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 ...
4
votes
4answers
5k views

multiple sub_filter rules for a reverse proxy on nginx?

with no evil plans I am trying to mirror a site under other domain, while changing a few strings on the fly. I set up nginx on a new host to serve as a RP to the master site. This allows to set one ...
1
vote
1answer
27 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 ...
1
vote
1answer
19 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
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
2answers
963 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
1
vote
3answers
2k views

How to configure apache as a reverse proxy with the remote server specified in a query string parameter

Problem: I'm trying to configure apache as a reverse proxy where the remove server is specified in a query string parameter. Let's say I'm serving a site at mywebapp.com. If you navigated to ...
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
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: ...
2
votes
3answers
2k views

lighttpd config and rewriting/disabling attempts to access favicon.ico

I've got lighttpd and apache working together on an app I'm building. lighty is serving out static content. However, each time a static asset is requested, I see a not found: favicon.ico message in ...
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
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 ...
6
votes
3answers
7k views

Different nginx rules based on referrer

I'm using WordPress with WP Super Cache. I want visitors who come from Google (That inlcudes all country specific referrers like google.co.in, google.co.uk and etc.) to see uncached contents. There ...
-1
votes
0answers
34 views

How to rewrite a domain name in nginx [closed]

I am using Nginx as a reverse proxy. I am trying to configure the server such that any request ending with .net will be redirected to net- For example: example.net should redirect to net-example.com. ...
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
3answers
3k views

nginx: How to redirect root to subdirectory while maintaining URL in the address bar

I have an nginx setup with folder structure like this: - www |- splash |- blog www is the root folder. I would like to redirect users who access http://mysite.com to the splash folder. But I don't ...
4
votes
1answer
5k views

How to use IIS URL Rewrite with gzip compression

I've been trying to create outbound rules in IIS 7.5 on Windows 2008 R2 on a site that has static HTML pages and compression enabled. If I have any form of compression enabled (static or dynamic) I ...
0
votes
1answer
2k views

.htaccess Rewriting Tomcat Server

I am writing a website using Railo. My code is to be deployed on a Railo Server running on Tomcat, overlayed on a regular Apache+PHP server. I need to send all requests to ...
0
votes
0answers
30 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
4answers
6k views

How to redirect or rewrite IIS site with port in URL to URL without port?

I'm not 100% sure if this is the right part of StackOverflow to post this but to me it made the most sense. Sorry if its not! Currently I have a site in IIS configured on HTTPS with port 7500. I can ...
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 ...
4
votes
3answers
8k views

Apache Virtual Host Config www vs non-www, Rewrite or sServerAlias?

We have a central httpd.conf and we include confs for various virtual hosts. Until today, we didn't really have a need for "www.subdomain.site.com" domains, only "subdomain.site.com." Now we do, so I ...
0
votes
2answers
6k views

nginx rewrite rule to convert URL segments to query string parameters

I'm setting up an nginx server for the first time, and having some trouble getting the rewrite rules right for nginx. The Apache rules we used were: See if it's a real file or directory, if so, ...
0
votes
1answer
2k views

Rewrite all requests to index.php except certain subdirectory requests

I want to rewrite all requests to /index.php, except /css/* and /js/*. This is my original config location / { try_files $uri /index.php$is_args$args; } which works, but lets me access all ...
0
votes
1answer
2k views

Nginx URL virtual host rewrite issues with Magento e-commerce. Help please

I've been running into some serious problems with my URL rewrites and I can't seem to fix it on my own strength and knowledge and troubleshooting on the web! Basically what happens is that when I ...
1
vote
1answer
39 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
23 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 ...
1
vote
1answer
287 views

Rewrite Location response header in lighttpd

I have an instance of lighttpd 1.4.35 listening for https traffic and reverse-proxying it to a back-end server. I.e., .----------. .----------. client ---https--> | ...
0
votes
1answer
1k views

Haproxy “use_backend” match order

I have a problem with Haproxy, it's a snippet of my haproxy.cfg below, acl url_a path_beg /a acl dom_eye hdr_dom(host) -i www.mydomin.com use_backend eye1 if dom_eye use_backend ...
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
34 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 ~* ...
2
votes
1answer
3k views

How to exclude a sub-folder from HTaccess RewriteRule

I have WordPress installed in my root directory, for which a RewriteRule is in place. I need to password-protect a subfolder ("blue"), so I set the htaccess in that folder as such. Problem is that ...
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
2answers
7k views

nginx: Disallow Access to a Folder, except some subfolders

How it is possible to deny access to a folder, but except some subfolders in it from "deny"? I tried something like this (in this order): #this subfolder shouldn't be denied and php scripts inside ...
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
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
1answer
64 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
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
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, ...
4
votes
1answer
3k views

nginx $uri is url decoded

I am using nginx as reverse proxy and I have 2 rules like: location ~ ^/indirect { rewrite ^/indirect(.*) /foobar$1; } location ~ ^/foobar { set $url ...
0
votes
0answers
40 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
90 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 ...