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
2answers
12 views

blogger to pelican nginx rewrite rule

I just converted my blog from blogger to pelican. On blogger, posts used to be something like: http://blog.example.com/2014/09/title-slug.html, now my blog on pelican is ...
0
votes
1answer
9 views

Removing the prepended directories from $1 variable in a rewrite rule

I have this rewrite rule RedirectRule ^(/arf/sites/.*)$ /docs/saf/files$1 [R=301,I,L] When it redirects, $1 contains /arf/sites/filename.html so after the redirect, the visitor ends up at ...
0
votes
2answers
61 views

nginx use rewrite as dynamic 404 image

I want to get a dynamic 404 response depending on the requested url: foo.jpg doesn't exist http://example.com/img/style/thumbnail/foo.jpg should show ...
1
vote
2answers
56 views

nginx + varnish, optimize caching urls for ssl and not

I have a working varnish cache for my websites, with the undesired side effect that requests for a domain with http are cached with a certain url, and requests for https with another url. That way I ...
1
vote
1answer
55 views

Rewriting (not redirecting) a URL in Nginx

I have a situation that I think is a bit different from most. It's certainly different from any that I've encountered before: I'm building a site for a client who wants/needs to retain full control ...
0
votes
1answer
33 views

Nignx Redirect rule to a different url based on a query

We have a wordpress installation and need to redirect lost password link to another different url for this we trying to setup a redirect rule but this is not working. Can anyone please help us. ...
0
votes
1answer
21 views

How do I direct traffic without redirecting in IIS7.5?

We have a production machine running Window Server 2003. Previously, development took place in a WAMP environment but a few users are moving to IIS. The issue is, we have a directory on the server ...
0
votes
1answer
26 views

why isn't this nginx rewrite working?

I'm trying to redirect wp-content/uploads/(.*)$ to images/$1 but this location doesn't appear to be redirecting - why? Would it be more efficient to use try_files? location ^/wp-content/uploads/.*$ ...
0
votes
0answers
42 views

302 redirect on all pages of website, creating crawler issues

My website is having difficulties working with Facebook/LinkedIn/social crawlers. I think this may be due to the redirect headers it seems to be returning. Browsers can access the site completely ...
1
vote
1answer
92 views

Nginx rewite rules 403 error

I am having trouble with converting .htaccess files to nginx. I have 3 .htaccess files. The first .htaccess file is located in the document root and is as follows: Options +FollowSymLinks ...
0
votes
1answer
45 views

Serving multiple directory in one path/location with nginx

I have been trying serve multiple directories in one location so that all files can be access on /sys/assets/--FILE-- regardless of where is the file physically locate in the following folder ...
0
votes
0answers
24 views

IIS Rewrite Rule in web.config to redirect HTTPS requests to HTTP

I need to redirect all https requests to http, for example, if someone visits https://www.example.com/another-page/ to http://www.example.com/another-page/ I have the following rewrite rule in my ...
0
votes
0answers
18 views

Apache VHost states: “authnz_sspi:error OS 1326 user unknown”

We recently upgraded from Apache 2.2 to 2.4. Since we used to have SSPI authentication on the old version, I was looking for an alternative, since the old module is not supported in the new version ...
0
votes
1answer
23 views

Nginx to split web traffic to a blog hosted on my domain

At the moment, I am using an Nginx frontend to cache static content for my DotNetNuke based website hosted at the hypotetical address www.mydomain.com, along with some other tasks. In this era of ...
-1
votes
2answers
31 views

Apache serve static content according to hostname

I have tomcat running behind apache and some web application running on it. My application handles whitelabeling so if some user will goes to subnet1.myhost.com he will se some website and ...
0
votes
1answer
51 views

Front-ending several web applications on port 80 using a proxy

I have several web applications hosted on an AWS server on different ports, e.g. app1: http://x.x.x.x:8080 app2: http://x.x.x.x:9000 ... I would like to a proxy in front of these apps (apache, ...
0
votes
0answers
34 views

How to make subdomain point to a different path without a redirect?

How can I make http://param1.domain.com act as if it's loading http://domain.com/param1 in Nginx? I do not want to redirect to http://domain.com/param1. So far I have created a new server block ...
1
vote
1answer
62 views

Apache proxy for multiple servers: comparing two solutions

I need to setup Apache proxies for multiple servers, one proxy for one server. I can do this in two ways: Setup one virtual host and multiple proxies. Each server is served as a sub-directory of the ...
0
votes
1answer
11 views

Lighttpd: How to migrate a rewrite rule?

i'm using this htaccess rule on a apache: RewriteEngine on RewriteCond %{HTTP_REFERER} example\.com [NC] RewriteRule .* - [F] .. and i would convert it to an lighttpd rewrite rule. How can i do ...
0
votes
1answer
22 views

nginx valid_referer for all files inside a directory

I have this config location /mirror/files { valid_referers none server_names example.com *.example.com; if ($invalid_referer) { rewrite ^/(.*)$ http://example.com/; } ...
0
votes
1answer
32 views

nginx Subdirectory Rewrites for MVC

I am tasked with administering a web application that has a base directory with a bunch of legacy code in it, and a subdirectory of my own making with an MVC based API which we are using to slowly ...
0
votes
2answers
92 views

IIS ARR/Reverse Proxy 502 Errors for Larger Files

I have an API written in Python which I am accessing with IIS 7.5 via the ISAPI extension PyISAPIe. I thought it would be sensible to separate this API from our main site, so it is in a different site ...
0
votes
1answer
93 views

Nginx redirect for specific file extension

I'm having trouble setting up the redirects for a Magento extension. The URL requested is: ...
0
votes
1answer
63 views

How to make Nginx include index.php in file paths for sub-directories as well (Magento Multistore)

Running multistore setup with Magento on an Nginx server. I'm watching the access logs and can plainly see what is happening. Like many PHP web apps, it uses index.php in its URLs and I have it set to ...
0
votes
2answers
30 views

Rewriting a download URL, but “save -as” dialog shows original URL

I have the following mod_rewrite directive in my lighttpd config file: url.rewrite-once = ( "foo.*$" => "static/foo.pdf", ) I'd like to hand out URLs like this: ...
0
votes
2answers
39 views

nginx rewrite if requst_uri contains some numbers

I'm having a little problem with some rewrite rules for a website. My permalinks are now something like domain.com/ID/permalink-ID.html The old structure of permalinks was ...
0
votes
1answer
41 views

nginx rewrite tld to match language of site

I have an issue with my nginx config for my joomla site. I want to rewrite/redirect based on the tld used. Example: domain.fr -> domain.com/fr domain.se -> domain.com/se How can I achieve this?
0
votes
1answer
74 views

Convert apache rewrite rules to nginx

I want to migrate an Apache setup to Nginx, but I can't get the rewrite rules working in Nginx. I had a look on the official nginx documentation, but still some trouble converting it. ...
0
votes
2answers
26 views

RewriteRule Works With “Match Everything” Pattern But Not Directory Pattern

I'm trying to redirect newsletter URLs from my local server to an Amazon S3 bucket. So I want to redirect from: https://mysite.com/assets/img/newsletter/Jan12_Newsletter.html to: ...
2
votes
2answers
141 views

nginx rewrite regex for API versioning

What I want is for the first to be turned into the second.. /widget => /widget/index.php /widget/ => /widget/index.php /widget?act=list => ...
0
votes
0answers
35 views

iis reverse proxy: one default server and a fall-back

After spending dozens of hours to no avail, I am now asking for help with my IIS issue. I use IIS as a reverse proxy, which provides HTTPS encryption and authentication. The public site is, say, ...
-2
votes
1answer
62 views

Nginx rewrite rule not working

Can someone help me convert this rule? I have over 50 rules, but I can not make this rule work: #APACHE RewriteRule ^([^/]*)/([^/]*)\.html$ /?cmm=$1&page=$2 [L]
0
votes
1answer
207 views

IIS URL Rewrite - Redirect any HTTPS traffic to sub-domain

Our hosting environment dictates all secure traffic music travel over a particular sub-domain. We are using the .NET CMS Umbraco, which as far as I'm aware doesn't have any functionality to 'assign' ...
0
votes
0answers
6 views

IIS Global Input Options

Recently the site I was working on added language handling in this way: content tailored toward users of a certain language will have urls that start with baseUrl/[a-z]{2}-[a-z]{2}/... (I may be more ...
0
votes
1answer
49 views

Lighttpd splitting request URI and dropping query parameter

I'm running lighttpd 1.4.33, which is reverse proxied to from an Apache server that is open to the Internet. When accessing a script from the local address of the lighttpd server, GET parameters are ...
0
votes
0answers
154 views

Nginx PHP index.php rewrite not allowing proxy pass to '/writing'

What I'd like: I want to have the laravel site show unless it's for /writing. In that case I want it to proxy pass anything in that subdirectory to a nodejs site. What happens: The laravel site ...
0
votes
1answer
102 views

htaccess and rewrite - Internal redirect within Alias

I have the following .htaccess within a subdirectory: RewriteEngine on RewriteRule ^file.js$ file.php This works by internally redirecting the request to the PHP file, with the same name, which is ...
0
votes
1answer
40 views

can htaccess file define different RewriteBase for production and dev servers

I have htaccess files that use different RewriteBase on production and dev (windows) pc. Currently I change the RewriteBase manually when deploying. Can this be done automatically with some ...
0
votes
1answer
29 views

How can I have users coming from the internet and a private WAN access the same web portal?

I am trying to configure access to a web portal hosted on a private WAN for internet users, originally the plan was to use split-DNS to resolve the hostname depending on what ip the client was coming ...
0
votes
0answers
71 views

Multiple Rewrite rules not working in htaccess file (mod_rewrite)

Can anyone help me how to write multiple rewrite rules in htaccess file. In my condition I want to remove index.php from url and also want to use file based cache busting, I am using following code in ...
-1
votes
1answer
24 views

How to set up tomcat7 to forward all requests to the appname?

I have a tomcat7 server hosting my app. I've got port forwarding set up with iptables so right now you can access the app like so: http://ip-address-of-server/appname I've also set up the domain ...
0
votes
1answer
33 views

IIS maintenance with client IP exceptions

I'm have no experience with IIS server, but I will have to perform site update. Is there an easy way to put maintenance page, which will be shown to all clients except ones connected from predefined ...
0
votes
1answer
34 views

How to use # in url as a redirect rule in htaccess for apache

I am having a difficult time figuring out how to have the following work: I am trying to redirect a url in htaccess I am trying to redirect from example.com/test.html to example.com/index#test I ...
-1
votes
1answer
46 views

IIS (or .htaccess) URL Rewrite not working correctly - need to capture number argument as query string

I'm trying to have: http://sub.domain.org/123456 become http://sub.domain.org/index.php?q=123456 I have tried many ways, and one way sort of worked, but then all subdirectories (including images) ...
0
votes
1answer
131 views

Howto rewrite URLs with two nginx as reverse proxies to gunicorn/Django

I have a Django application, deployed with gunicorn on port 8000, on a VM with a backend nginx, port 80, on the same VM. The nginx config is: location / { proxy_http_version 1.1; ...
0
votes
2answers
87 views

nginx rewrite location not found

in Nginx config file, did set rewrite location like below but do not work and every time return 404 not found, what is the problem here? server { listen 80; server_name mydomain.com ...
0
votes
3answers
48 views

How to remove hypen (-) using nginx rewrite rule?

I am using this rewrite rule to redirect example.com/a-b-c?id=learn-more ----> http://example.com/abc?id=learnmore rewrite ^/a-b-c?id=learn-More http://example.com/abc?id=learnMore permanent But ...
0
votes
1answer
68 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
2answers
25 views

Apache Rewrite URL

I had my document DocumentRoot set to www/fg. Before, I did browse to www/fg by typing http://www.mydomain.com/www/fg. Then, I set up VirtualHosts that point to www/fg. And now I just type ...
0
votes
1answer
55 views

How to modify querystring using URL rewriting?

I am having very less knowledge in URL rewriting, So not sure weather this can be done or not using URL rewrite? I have a URL like ...