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

StatusWolf 0.8.8 GUI issues: '/undefined/' in URL path as found in Apache access log

I've just installed StatusWolf 0.8.8 on Ubuntu 12.04, running Apache 2.2.22 with PHP 5.4.23. I had retrieved the latest Git source using: git clone https://github.com/box/StatusWolf.git and ...
2
votes
1answer
2k views

Nginx & PHP-FPM - Unable to open primary script ERROR

I have a blog with some rewrite rules when in comes to viewing single posts. The viewing is handled by a file named view.php. I am using some rewrite rules in my vhost config as follows: location ...
0
votes
0answers
58 views

issues redirecting apache site in HTTPS

I have a web site running on apache2 where I needed to implement a few redirects. They are fairly basic, but I am having problems on a specific part. I need the following redirects to properly ...
0
votes
1answer
162 views

Trouble converting .htaccess rewrite rules for nginx

Hi all I am trying to convert the following .htaccess code <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
0answers
163 views

How do does one host a Kohana installation from a subdirectory on Nginx?

I am attempting to host a Kohana installation on Nginx. The difference is that I am trying to serve it up from a subdirectory as opposed to the web root itself. The problem: When trying to access ...
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
367 views

IIS7 URL rewrite - Path has question mark (not query string)

I need to redirect this: http://www.example.com/?/careers/ to this: http://www.example.com/jobs/ But IIS7 URL rewrite does not recognize the question mark, even if I try to escape it. Is this ...
0
votes
0answers
37 views

htaccess works fine on local but differently on remote

Hi I have an htaccess working fine on my local machine but when i upload it to my remote machine it works differently. RewriteEngine on RewriteCond %{REQUEST_URI} ...
1
vote
0answers
82 views

Setting up nginx, rewrite and fastcgi

This problem has been driving me nuts for the last couple of days... Working on an application that needs authentication and exists of different parts (CMS, API, frontend) we ran in to some problems ...
1
vote
0answers
50 views

How to convert RewriteCond rules so they work in Lighttpd?

How can I convert this Apache rewrite rules so they work on Lighttpd? This is in fact a .htaccess file, and I need to put those in a lighttpd.conf file. Options +FollowSymLinks RewriteEngine on ...
0
votes
0answers
260 views

How to convert this .htaccess to Lighttpd?

I converted .htaccess below to Lighttpd but it doesn't work. What mistake did I make? You can find original .htaccess below, and the file I converted below it. Original .htaccess: RewriteEngine On ...
0
votes
0answers
37 views

URL Rewrite with Ngnix

I have a scenario today where I have an apache with mod_jk balancing requests to JBoss cluster. In this configuration I have some rewrite rules to remove the context root of the url. EX: URL request: ...
1
vote
2answers
68 views

How to use mod_rewrite to abstract get request with subdomains

I've been at this all day and I thought I had a handle on regular expressions but I'm no longer confident that I do. I've searched all over, read through some horrible guides on mod_rewrite and I'm ...
-1
votes
1answer
214 views

Howto urlrewrite for subdomain in IIS 8

I have 2 domains on server2012, IIS8 www.abc.com and www.xyz.com mailenable works like this way: www.xyz.com/mewebmail I want users to access their mails like that: webmail.abc.com this means I ...
1
vote
1answer
126 views

Issue when redirecting a folder using IIS url rewrite

Using Url Rewrite, I'm trying to redirect /foo_bar/* to /foo/*. I've tried this: <rule name="Redirect foo_bar to foo" stopProcessing="true"> <match url="(.*)" /> <conditions ...
2
votes
0answers
86 views

Weird nginx configuration: multiple rewrite rules doesnt work

I have an application which knows how to prepare some special images and its running on a separate machine (i'm trying to use it as image server). When these images are prepared and served by ...
0
votes
1answer
820 views

Ngnix Rewrite - If URL contains

I'm having a small issue - my error log is filling up with requests to a directory folder on my site (but with added data that shouldn't be there). http://example.com/the-directory/undefined ...
1
vote
0answers
149 views

Rewriting a proxied upstream

I have a server which serves LuCI for me on localhost:8080. I'm trying to proxy to it via nginx, but I'd like to rewrite the URLs so that instead of https://myserver/cgi-bin/luci, I have ...
0
votes
1answer
51 views

Redirect in nginx with extracting params from the url

I have a very long url's like: https://mydomain.com/post/api/v5/apps/123/events/viewitem?data={"h_Authorization":"Basic ...
1
vote
0answers
171 views

Getting error 500.52 when creating reverse proxy with url rewrite

I have used the following technique for achieving Url rewriting. http://weblogs.asp.net/owscott/archive/2013/10/24/creating-a-reverse-proxy-with-url-rewrite-for-iis.aspx However i am getting the ...
0
votes
1answer
508 views

nginx reverse proxy fix remote url

I have a wordpress site on different machine behind nginx reverse proxy. The remote host is 10.0.1.1/kehitys/testi/wordpress and I would like to serve this out as www.host.com/. Is there some way to ...
0
votes
1answer
233 views

NGiNX and MediaWiki rewrite regular expression

I am having some problems with regular-expression with rewrite in NGiNX. Here is my config: location /wiki/ { rewrite ^/([^?]*)/([^?]*)(?:\?(.*))? /$1/index.php?title=$2&$3 last; ...
0
votes
2answers
2k 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
33 views

Nginx rewrite to fixed destination link

I would like to rewrite all incoming links to a fixed destination link. Any arguments and URI paths should be dropped, so http://domain1.com/blah/blah.html?test=3&test2=4 should always become ...
2
votes
1answer
71 views

Nginx reverse proxy forces 301 on subdomain (and it shouldn't)

So I'm using Nginx (1.4.3) to reverse proxy a domain and sub-domains. I installed SSL certs to handle the main domain (example.com) and a couple sub-domains (lets say test.example.com and ...
5
votes
2answers
3k views

Temporarily redirect *all* HTTP/HTTPS requests in IIS to a “server maintenance” page

We've got an IIS server that hosts hundreds of separate web apps, and the physical database server that hosts these apps is going to be taken offline for maintenance for a brief period (we expect it ...
3
votes
0answers
138 views

How to organize millions of static files to serve efficiently over the web?

I'd like to create a service to serve several hundred thousand smaller files (from 5kb to 500kb, mostly around 10-100kb). Think of it as a kind of gravatar.com which serves those little avatar pics on ...
3
votes
1answer
57 views

Multiple rule Apache rewrite

I am trying to set up a hierarchy five levels deep with mod_rewrite. This is what I have put together at this point. It works for the last two levels (the first and second rule) but not after that. ...
1
vote
0answers
245 views

How to rewrite using htaccess if the file exists in another folder?

We are trying to rewrite to another folder if the file does not exist in the document root, but does exist in the other folder. The other folder is in a completely different location, which is ...
0
votes
1answer
536 views

How to forward to Amazon S3 when in maintenance mode with nginx using 503?

During website maintenance, it is sometimes necessary to shutdown our website. Our current method is to touch a file which will trigger the web server (nginx) to redirect traffic to a maintenance ...
0
votes
0answers
39 views

How can I use AAR and RewriteModule to proxy AJAX requests?

Using IIS 7.5 with Advanced Application Routing. I have setup a rewrite rule so that all requests to http://server1/proxy/* goto http://server2:8080/* eg: a request to ...
1
vote
2answers
593 views

Apache2 mod_rewrite + userdir

I have an Ubuntu Server (web) with the following configuration Version: 13.10 Installed: Apache2, apache2 utils, php5 Enabled: rewrite, userdir Problem When I try to use rewrite rules, for example ...
0
votes
1answer
718 views

How to explicitly apply percent escapes to a URL in nginx?

I have the following configuration: location ~ ^/((index\.php|robots\.txt|admin|static|uploads|api)(/.*)?)$ { proxy_set_header Host $http_host; proxy_pass http://localhost:1337/$1?$args; } ...
0
votes
1answer
887 views

Apache misbehaving (returning 404s)

CentOS 6.4 64-bit Apache 2.4.6 PHP-FPM 5.5.4 Homepage from root loads fine http://csillamvilag.com But all other pages return 404 (CMS is WordPress). I am also able to access and log into WordPress ...
0
votes
2answers
355 views

Conditionally Rewrite Email Headers (From & Reply-To) Exchange 2010

I have a client who maintains Company A (with email addresses %username%@companyA.com) and they own the domain companyB.com however there is no "infrastructure" (no Exchange server) set up ...
0
votes
1answer
163 views

Nginx upstream returning port - How to rewrite $host?

I am using Nginx and am using proxy_pass to proxy through to upstream application server. This is working fine, however the server responds with https://domain.com:81/ How can I rewrite the host from ...
2
votes
2answers
3k views

Add trailing slash when it's missing in nginx

I'm running Magento on Nginx using this config: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/configuring_nginx_for_magento. Now I want to 301 all URLs without trailing slash ...
0
votes
1answer
543 views

IIS7 URL Rewrite - Checking for X-Forwarded-For header

I am pretty familiar with IIS and URL Rewrite but I just got a task which stumped me. I need to check each request for the presence of the X-Forwarded-For HTTP header and, depending on its presence, ...
1
vote
0answers
235 views

nginx codeigniter rewrite: Controller name conflicts with directory

I'm trying out nginx and porting my existing apache configuration to nginx. I have managed to reroute the codeigniter url's successfully, but I'm having a problem with one particular controller whose ...
0
votes
2answers
60 views

301 redirect from non www to www issue

I have been trying to set a 301 redirect from a non www to a www domain since yesterday but it only cause problems on my site. I first tried it from the control panel of the website, then by modifying ...
4
votes
3answers
9k views

Nginx redirect one path to another

I'm sure this has been asked before, but I can't find a solution that works. A website has switched CMS services, but has the same domain, how do I set up an nginx rewrite for a single page? E.g. ...
0
votes
1answer
109 views

Getting “negotiation: discovered file(s) matching request:” error not sure why

I'm currently trying to transfer a site to a new server running Ubuntu 12.10. The site worked fine on the old server, however, the new server is giving me some problems. When I access the site, I get ...
0
votes
1answer
82 views

Apache2: Trying to map a subdomain to a subdirectory

So basically I want to have: sub.domain.com/anything -> domain.com/asub/anything I'm a bit new to this and a bit confused. The first thing I did was configure my DNS settings so sub.domain.com goes ...
1
vote
1answer
378 views

Nginx rewrite with Simple Machines Forum

I am running Nginx 1.5.6 and I use the Simple Machines Forum software. Most rewrite rules seem to work properly, with the exception of the RSS feeds. In my Nginx configuration, I have the following ...
0
votes
1answer
551 views

nginx rewrite rules with regex applied to one subdirectory only

I've been frustrated for days trying to figure this out, so any advice/help would be greatly appreciated! I've recently added a section called /links to a site at somehost.com but can't seem to get ...
0
votes
3answers
2k views

Apache > 2.2.22 rewrite rule not working?

since yesterday I'm trying to figure out how to fix the following: running phpipam (http://www.phpipam.net/) with WAMP (Windows environment). The problem I am facing is related with RewriteRule ...
0
votes
1answer
171 views

Server remembering old rewrite rules, even when I remove htaccess

I have set up a development server with Ubuntu and LAMP, but for some reason the .htaccess is acting strange... There is a site on there with a set of rules, when I comment them out they still work, ...
-2
votes
1answer
80 views

Rewriting .php extension to .png

I am quite new to Nginx, so my apologies in advanced for any messups. I am trying to rewrite my script titled 'test.php' to 'test.png', so when you go to 'test.png', it displays the php content, ...
1
vote
1answer
36 views

Ningx rewrite for specific dir

I have to admit I am completely new to WebServers and now try to figure out how to configure my nginx (for home-purpose). I have already running a web-service rutorrent on my nginx with the default ...
0
votes
0answers
65 views

htaccess Rewrite leading zero in url causing trouble

I have a database with a string column made up of four unique digits attached to each record. I know this isn't the best way to do this but I'm kind of stuck with it. I'm trying to rewrite urls from ...