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)

1
vote
1answer
112 views

Nginx reverse proxy gives 404 with static content requests

Our setup is two servers: One serves WP installation The other one is used for extra custom functionality. Server 1 that hosts WP is using Nginx as web server and reverse proxy to Server 2. In ...
0
votes
0answers
58 views

Nginx URL rewrite / mask

Currently, my $_GET parameters are ordered alphabetically (a, b, c, d, etc...) For example: https://domain.com/?a=Menu1&b=Menu2&c=Menu3 What I want is this URL: ...
0
votes
1answer
60 views

Rewrite rule custom 301 redirection

I have link like this: www.example.com/full-image/folder/subfolder/image-name.jpg-some-custom-keywords.html and I need 301 redirection to url like this: ...
0
votes
0answers
41 views

Custom rewrite rule - migationg to WordPress CMS

I am trying to move my image gallery site from one CMS to Wordpress. On current CMS I have page with medium size image on it with URL: ...
0
votes
1answer
164 views

NginX Causing PHP File To Be Executed Twice

I'm between a rock and a hard place trying to figure out why this is going on. For some reason, when I open my website the index.php file is being executed. I have been able to narrow it down to ...
0
votes
0answers
45 views

nginx rewrite subdomain to other subdomain

I have a atlassian server with the following config: server { listen 443; server_name servicedesk.example.nl; ssl on; ssl_certificate certs/jira.cer; ssl_certificate_key ...
0
votes
1answer
36 views

URL Rewrite issue

I'm a newbie on this and need some help on creating a rule to rewrite http://dev.test1.com/sub1 to http://dev.test2.com/sub1 as shown below. <rule name="Route the requests for sub1" ...
0
votes
0answers
53 views

Nginx, rewrite css file requests to default css file

I'd like that all requests to a certain location would get rewrited to a default file in that folder, in Nginx. The requested files don't exist in that folder. I tried this: location ...
0
votes
0answers
149 views

Nginx rewrite, adding query string and index.html

I want to serve several campaigns from the same site. So when people come to: mysite.com/somecampaign I want to rewrite it to: mysite.com/?campaignId=somecampaign Then for images/scripts etc, ...
0
votes
1answer
68 views

Nginx mutliple rewrite rules per location

I've got a working nginx rewrite for a location, but in the case of a specific request I want to rewrite to a different location. location /api { if (!-e $request_filename){ rewrite ...
0
votes
1answer
440 views

Cache header for dynamically created url

I have a PHP script that generates a thumbnail based on an existing path (more info). The basic idea is this: Given the document root /web/, an image lives in /web/images/foo.jpg. When a predefined ...
0
votes
0answers
208 views

Nginx Virtualhost; Can't Add Simple Rewrite Rule

I've come up with this pretty handy Nginx virtualhost file for a PHP Codeigniter site. It works as-is, but I'm trying to do additional rewrites and I'm not having any luck. server { listen 80; ...
0
votes
1answer
719 views

nginx url rewrite rule

I'm doing a migration from a WordPress blog to a Jekyll Blog using NGINX as my HTTP server and I don't want to break the Internet by leaving some URL's not working as expected. I got to a point where ...
0
votes
1answer
42 views

Query Sring - Variable redirection

I need help on this query string: I am using IIS 8 and I have this URL: http://automotive.ooplinks.com/index.php?route=product/search&filter_tag=westin *I would like to redirect the variable ...
1
vote
2answers
1k views

How to check if mod_alias is enabled?

I want to try mod_alias instead of mod_rewrite for a couple of simple redirect rules, but the directives don't seem to be working when entered in .htaccess. Is it possible that mod_alias is not ...
0
votes
1answer
510 views

use .htaccess to change the url example.com/mobile to m.example.com

I have am setting up a social network script, it has both a desktop and a mobile version of the site. When a mobile device tries to browse the site, the mobile page is served with the url ...
1
vote
1answer
47 views

RewriteRule preserving path across environments [duplicate]

I'm trying to come up with some redirect rules that'll work on my local working directory and production. The problem being my local dev env works via "localhost/exp" where as the production works ...
1
vote
1answer
59 views

Can't find IIS Rewrite Rule in Config XML

I created a new URL rewrite rule through the IIS manager GUI. But when I browse to the site config XML file, I don't see any rewrite rules even though I have confirmed the rewrite is working. I had ...
0
votes
1answer
47 views

nginx rewrite single php page

I am really struggling to understand and achieve a very simple operation in nginx. I'm trying to rewrite the following page: http://test.domain.com/prova_pagina.php to http://test.domain.com/p/ ...
1
vote
0answers
77 views

Request exceeded the limit of 100 internal redirects due to probable configuration error

This error only seems to happen to a few pages. Others will load just fine, some slower, but others will error out: # BEGIN WPSuperCache <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ...
0
votes
1answer
93 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
1k 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
117 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
147 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
339 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
34 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
79 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
48 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
255 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 ...
1
vote
0answers
36 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
66 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
173 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
74 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
81 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
714 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
140 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
50 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
155 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
397 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
205 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
31 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 ...
0
votes
0answers
62 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 ...
0
votes
0answers
251 views

Nginx not passing rewrite to FPM

Here are the pertinent lines of my nginx.conf file. location / { try_files $uri $uri/ /index.php @rewrite; } location @rewrite { rewrite ^/customer/(.*)$ /customersDisplay.php?id=$1; ...
5
votes
2answers
2k 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 ...
2
votes
0answers
127 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
219 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 ...