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
0answers
242 views

How to get IIS to accept-encoding: gzip(gfe)

Google's PageSpeed Service forwards requests with the accept-encoding header set to gzip(gfe). Unfortunately IIS chokes on this with the following: HTTP/1.1 400 Bad Request Content-Type: text/html; ...
0
votes
0answers
32 views

IIS7.5 URL Rewrite generating error after importing site

I have two Windows 2008 R2 servers with IIS 7.5. One server has a website configured with URL rewrite rules. I copied the site directory to the second server and set up a new site, using this ...
1
vote
0answers
278 views

FallbackResource in subdirectory

I manage a large number of PHP applications using front controllers and the following htaccess file: FallbackResource /index.php Yes, that is the entire file (for each application)! However, a few ...
1
vote
1answer
248 views

Rewrite nginx rule for for a directory to another domain/sub domain

i have setup the following nginx rewrite rule . But doesn't seems to be working, * location /images { rewrite ^(.*)$1 http://sub.domain.com/$1 permanent; } * for images i'm trying to ...
1
vote
1answer
433 views

Nginx htaccess rewrite specified folder

I tried to convert this htaccess rules to nginx: apache # Necessary to prevent problems when using a controller named "index" and having a root index.php # more here: ...
4
votes
2answers
9k views

Nginx Redirect via Proxy, Rewrite and Preserve URL

In Nginx we have been trying to redirect a URL as follows: http://example.com/some/path -> http://192.168.1.24 where the user still sees the original URL in their browser. Once the user is ...
0
votes
0answers
278 views

Redirect only /index.php page and allow access to all sub directories

I'm running ExpressionEngine (www.mywebsite.com) as the root of my website and Magento in a sub directory (www.mywebsite.com/store) I'm trying to redirect the Magento homepage (and only the homepage) ...
0
votes
1answer
81 views

Nginx second domain rewrite rule

What im trying to do: I have nginx running with wordpress Now i want DOMAIN-2 to redirect to a path of DOMAIN-1 http://DOMAIN-1/Content-for-Domain-2 but not just a simple redirect, it should ...
1
vote
0answers
60 views

IIS rewrite rules for subdomain and nonexistent files

Setup: I know how to use a rewrite rule to route urls to a routing script such as router.php. I know how to use a rewrite rule to route urls containing a subdomain to subfolders in the document ...
1
vote
1answer
46 views

Is it possible to redirect a url to another url so that users see always the original url?

I have a website whose url is subdomain.example.com but I want users to use a different url to access it, example.com/subdomain. Just to add a bit of context, the two domains are on two separate ...
1
vote
1answer
78 views

apache change proxy request url rewrite

I have problem with proxy requests. I need to enable apache mod_proxy for my subdomains but i forgot to set Allow from mydomain.com, it was Allow from all...Yes, i created open proxy for all world... ...
0
votes
0answers
135 views

nginx rewrite - proxy if file not exists

I have a local directory (uploads) and an S3 bucket setup. when the user is uploading an image the file is stored on the local directory: /uploads/member_id/image_name and after 30 minutes the system ...
0
votes
1answer
151 views

Apache mod_wl encoding issue for URI part

I'm using Apache2 in combination with mod_wl_20.so to loadbalance to 2 weblogic instances. Apache is listening on 7070. This plugin is partialy removing the encoding of my URI of some searches which ...
0
votes
1answer
322 views

rewrite rule nginx to add trailing slash with wordpress and exclude files with extension

I have one installation with wordpress running on nginx with php-fpm. I want to redirect all uris without final slash / to a same uri with /, and i want to exclude all files with extensions. I have ...
0
votes
1answer
70 views

Nginx rewrite and 50x.html

I'm trying to set up a website where writing for example /users/add redirects me to /index.php?table=users&action=add I wrote the following rules: rewrite ^/(.+)/(.+)/$ ...
0
votes
1answer
56 views

Apache - how to use a rewrite rule per vhost?

I have set up a vHost as follows: <VirtualHost *:80> ServerAdmin webmaster@example.com ServerName example.com ServerAlias www.example.com DirectoryIndex index.php DocumentRoot ...
-2
votes
1answer
633 views

Nginx - Meaning of the ~ (tilde) in the location block of the nginx.conf?

WHat is the meaning of the tilde after the locaton block in the nginx conf ? for example location ~ ^/download/(.*)$ { alias /home/website/files/$1; } What is the difference between with and ...
1
vote
0answers
18 views

Setting a bail out proxy based on HOST header

We have set up a proxy during our migration phase and saw that people try to abuse it. It is correctly configured and forward only to our application server but these trials charge our main server. ...
1
vote
1answer
124 views

Nginx redirect all subfolders but the folder itself

I have a weird clash of names for a Wordpress installation, and I need to write a couple of Nginx rules to fix it. I used to have my software projects listed in the Wordpress page /projects, with ...
0
votes
1answer
637 views

w3wp.exe crash (rewrite.dll) IIS 7.5

I'm experiencing several crashes in the last days on our production server and I can't figure out how to fix this issue. The server hosts an ecommerce application, written in classic ASP, that runs ...
0
votes
1answer
63 views

nginx rewrite folder http to https

I currently have 2 server containers, 1 for http, and another for the same server but https. I want to merge those containers using Listen 80; and Listen 443 ssl;, which works but I need to rewrite a ...
0
votes
1answer
111 views

activate htaccess only on specific URI

I have an apache webserver running on an ubuntu system. To avoid access for unauthorized users, I have an active .htaccess: AuthType Basic AuthName "own area" AuthUserFile /path/to/.htpasswd require ...
1
vote
1answer
26 views

Redirect based on parameter

I'm trying to redirect a page based on the parameters passed. I would like redirect rewrite ^/join_trial to /test? permanent; and rewrite ^/join_trial?discount=free(.*) /test2? permanent; The ...
0
votes
1answer
83 views

MOD_REWRITE for rewriting GET requests [duplicate]

I need a .htaccess expression to use the second get variable or get the get variable by name. Currently my mod_rewrite alters the URL to remove index.php filename and alter the pageName GET variable ...
0
votes
1answer
317 views

Rewrite rules for Anchor CMS on Lighttpd

I installed Anchor CMS on my server running Lighttpd, and I am trying to setup pretty url's. I have anchor installed in a sub-directory "/blog". The htaccess file that works with anchor cms in ...
0
votes
1answer
105 views

301 permanent redirection changing URL structure [duplicate]

I changed category urls on site. Old are like this: www.example-name.com/category-name-exactly-same-keywords/ ...
0
votes
0answers
115 views

IIS 7.5: Redirect domain alias to specific page

We have a website that host pages for multiple companies, typically they redirect a pag on their website to our website. However, we have a client that wants a custom domain. So we have traffic ...
0
votes
1answer
64 views

Nginx rewritte http to https but not /admin

I have client area which is https and works fine with this added to client.mydomain.com.conf : server { listen 0.0.0.0:80; listen [::]:80; server_name client.domain.com www.client.domain.com; ...
0
votes
1answer
85 views

IIS 7.0 URL rewrite not working with languageparameter

I want to eliminate the language token from the url http://www.mydomain.de/en-us/home.aspx and rewrite it to http://www.mydomain.com/home.aspx can someone explain whats wrong with this IIS rewrite ...
0
votes
0answers
54 views

IIS rewrite fails to append back-reference

In IIS, I'm trying to redirect a non-existent subdomain to a url, and include the remainder of the url in the redirection. For example: blog.abc.com/blah/blah/blah should go to: ...
0
votes
1answer
677 views

IIS URL Rewrite and Reverse Proxy

I have a reverse proxy rule that forwards all requests to a specific subdomain to an internal server and everything works great. <rule name="cloud.domain.com" enabled="true" ...
1
vote
1answer
119 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
63 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
65 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
42 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
186 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
48 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
38 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
69 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
154 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
86 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
488 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
217 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
861 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
47 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
2k 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
574 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
48 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
84 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
52 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/ ...