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
3k views

Apache rewrite rules and special characters

I have a server where some files have an actual %20 in their name (they are generated by an automated tool which handles spaces this way, and I can't do anything about this); this is not a space: it's ...
1
vote
1answer
3k 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
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
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
166 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
448 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
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
1answer
71 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
0answers
54 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 ...
1
vote
2answers
2k 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
512 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 ...
0
votes
0answers
150 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
729 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
0answers
209 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
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
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
60 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 ...
1
vote
1answer
1k views

Squid url_rewrite_program is not working

I'm writing a url_rewrite module for squid in python (OS: Ubuntu 13). For now the code is just a test which should print the received stdin to a file: #!/usr/bin/python import sys,os url = ...
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 ...
2
votes
2answers
249 views

nginx user_agent redirect

I want to redirect IE users to a static file, regardless of what page they were trying to reach. My code is inside a server block: if ($http_user_agent ~* msie ) { rewrite ^.+$ /msie.html last; } ...
0
votes
0answers
148 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
340 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 ...
5
votes
1answer
643 views

gallery2 and nginx with rewrite return file not found for file name with space (or + sign in url)

I have setup nginx with gallery2 on an internal server. Everything works fine under apache2 which I checked first, it used to be on apache2. Problem is: gallery2 seems to generate url with '+' sign ...
1
vote
0answers
49 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
votes
1answer
180 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
2answers
1k views

rewrite all .html extension and remove index in Nginx

How would I remove all .html extensions as well as any occurrences of index.html from a url string in Nginx http://www.mysite/index.html to http://www.mysite http://www.mysite/articles/index.html to ...
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
vote
1answer
76 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
726 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
156 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
408 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
209 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
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
254 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; ...
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. ...
0
votes
1answer
459 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 ...