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

Apache Redirect for Internal Traffic Only

We have a page, gateway.school.edu, where users have to fill out a recaptcha before being directed forward to our password reset. I would like any internal traffic, any user agent on our network with ...
0
votes
2answers
43 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
1k views

Nginx Rewrite rules for clean URLs

I want to write nginx rewrite rules for clean URLs. Everytime the user hits; http://domain.com/abc/12/16/abc-def-ghi I need to execute domain.com/abc.php?a=12&b=16&c=abc-def-ghi Now my ...
0
votes
1answer
740 views

Cross domain javascript form filling, reverse proxy

I need a javascript form filler that can bypass the 'same origin policy' most modern browsers implement. I made a script that opens the desired website/form in a new browser. With the handler, ...
0
votes
1answer
1k views

NGINX - url rewrite regular expression

I have the url such as example.com/page.php?username=test. I want to rewrite this url into something like: example.com/test only if test follows the following regual expression: ...
0
votes
1answer
30 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
15 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
251 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
0answers
322 views

ARR Reverse Proxy and multiple sites as subdirectories with IIS 7.5

I have multiple websites (combination of ASP.NET Webforms and MVC3) that we are trying to consolidate under a single domain with each site under a directory on this main domain. So I want to take the ...
1
vote
1answer
99 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
67 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
31 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
1answer
465 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 ...
2
votes
1answer
236 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
0answers
110 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 ...
11
votes
4answers
15k views

how to restrict access to directory and subdirs

I need to restrict access to any files or subdirs in direstory "testdir". My conf: ... location ~* ^.+\.(jpg|txt)$ { root /var/www/site; } location /testdir { deny all; ...
0
votes
2answers
62 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
0answers
274 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
45 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 ...
-1
votes
2answers
42 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
46 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 ...
0
votes
1answer
67 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, ...
1
vote
1answer
79 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
0answers
56 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 ...
0
votes
1answer
19 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
32 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
2answers
145 views

How to get IIS8/Server2012/Azure to drop URLs such as *.php without generating a 404?

I have been using a URL rewrite script since IIS7. This snippit from my worked/works fine on IIS7.5; <rewrite> <rules> <!-- Bad Unused Nuisance URLs --> <rule ...
0
votes
2answers
530 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
74 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
1answer
209 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
60 views

Multiple Rewrite conditions and rules for custom paths

At the moment I have… RewriteCond $1 !^(index\.php|img|css|js|fonts|jw|mail|uploads|user_guide) RewriteRule ^(.*)$ /index.php/$1 [L] However, I want to be able to rewrite a url like /page/about/ ...
0
votes
1answer
238 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 ...
1
vote
3answers
6k views

why i cannot download jdk from oracle web site directly without AuthParam?

that is download with the following command, why it fails to download that file? wget http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-i586.bin the following command works, but ...
0
votes
2answers
50 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 ...
2
votes
2answers
227 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 => ...
1
vote
1answer
73 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
429 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
1answer
153 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
77 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: ...
0
votes
0answers
74 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
138 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
54 views

How can I use Apache RewriteRules + PHP to determine which page to show?

I am trying to make a scalable RewriteRule on my .htaccess, I use each word before slash as a parameter. for example: http://localhost/mysite/param1/param2/param3/.../param20 I am working with this ...
0
votes
1answer
2k views

URL Rewrite in IIS 7.5 not working

I am trying to redirect all http traffic to https as the site requires SSL. For example, if someone navigates to http://site.com or http://www.site.com I want to redirect the user to ...
0
votes
1answer
87 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
8 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
0answers
240 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
421 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
60 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
30 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
89 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 ...