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

IIS 8 Win 2012 R2 - Rewrite redirect not working, page not found, address not changing

I have an MVC4 app and trying to rediret pages so that both http://example.com/about and https://example.com/about direct to https://example.com/about (where about could be any other page also). I ...
0
votes
1answer
27 views

Nginx: How to rewrite arguments passed to index.php?

I am struggling with some Nginx rewrits for url arguments passed to index.php: Old: ?topic=10126.msg36887 New: ?posts/36887/ My two questions: 1) How do I rewrite to the new argument structure ...
1
vote
0answers
14 views

Nginx restful url rewrite

I need to rewrite URL like this: example.com/demo/test/123/edit To: example.com/demo/test.php?a=123&b=edit It works with this rewrite rule: location /demo { rewrite ...
1
vote
0answers
8 views

Apache rewrite rule for multiple named virtual hosts with a 'catch all' rule

I have a redirect apache server that I setup for about 30 domains. I want to have all requests get redirected to the main server except for 1 domain. Basically any domain coming to this server gets ...
0
votes
1answer
40 views

apache rewrite rules, non-www, https

I have two applications on the same server and use apache rewrite rules to redirect: www requests to non www http reuests to https Everything works ok, except one case: request www.test2.test.eu ...
1
vote
1answer
21 views

Nginx Location Rewrite Rule matching GeoIP Header value

I'm looking to write a simple rewrite rule where I basically am trying to say the following If the requested URI is text/index.html (or test/) and the GeoIP Organization equals "My GeoIP Value" then ...
0
votes
1answer
37 views

How to restrict proxied apps based on application auth logic

I have a vhost with mod proxy that redirects fine, but I’d like to add to it. Here’s my vhost: <VirtualHost *:80> ServerName www.domaine.local ProxyRequests Off ProxyPreserveHost ...
2
votes
2answers
35 views

Apache to Nginx Conversion (Newbie)

I've got a Nginx Web Server Setup with PHP and I want to move on Nginx and I want to convert these .htaccess rules to nginx.conf file: RewriteRule ^blog(|/)$ /data/core/site/blog.php RewriteRule ...
-1
votes
0answers
14 views

Url rewriting in Amazon S3

I have a webapp hosted in Amazon S3, the webapp is build with jQuery Mobile and I use changePage lo navigate between pages, I'm not using the hash operator(#) when I change the page. I'm having ...
1
vote
1answer
42 views

Getting “Too many redirects” error with nginx rewrite rule

I am trying to rewrite the domain url that targets my site such that all domain names are rewritten to www.example.com and have the following config: mysite block server { listen ...
0
votes
0answers
28 views

Rename file in apache

I maintain large files versioning on a server. Files are stored rewrited (hashed) on several folders, such as : For file test.avi : FOLDER1/aeriuyzekjshdfkjh FOLDER1/aeriuyzekjshdfkjh#1 For file ...
0
votes
0answers
32 views

Nginx rewrite URL based on basic auth username

I have a static file serving set up in Nginx wherein different customers need to visit a different URL to get the content that is specific to them; in addition, they have to enter their username and ...
0
votes
1answer
17 views

Configuring a server-wide RewriteRule in conf-available

Lately I have been getting some referrer spam in my website's logs. In order to stop this (as it's quite annoying and also polluting my statistics), I want to block requests that are coming from ...
0
votes
1answer
31 views

nginx location regex /yyyy/mm/dd/

I'm trying to pass requests from address example.com/donor/2014/12/07/Name on the other server. URIs are like /donor/2014/12/07/Mike and I need to convert them to a query type of: ...
0
votes
0answers
34 views

nginx rewrite throw 404 with last and break

I have a virtual host like below for my Yii website server { root /var/www/code; index index.php index.html; server_name example.com; location / { rewrite ...
3
votes
0answers
20 views

IIS 7 Redirect from HTTP to HTTPS fail with ampersand in URL

IIS 7 on Windows Server 2008 R2 SP1 I have added the following rule to my web.config to redirect all incoming request to HTTPS <rule name="HTTP to HTTPS redirect" stopProcessing="true"> ...
0
votes
1answer
43 views

Postfix reply to emails addressed to external email while keeping the correct from address

I have a mail server all set up and running on ubuntu 14.04 with Postfix / Dovecot for the domain "postfixserver.com". A second domain "googleapps.com" is running on google apps. user@googleapps.com ...
1
vote
0answers
9 views

NVA: rewrite before or after Varnish?

I'm planning an NVA server system (Nginx-Varnish-Apache), where request are routed through in that order. Apache would be serving WordPress CMS or similar. I'm wondering where to apply additional ...
0
votes
1answer
23 views

nginx rewrite specific .css url to specific .php url

I'm assuming this is an easy one for anyone with nginx knowledge. I'm calling a URL like this: /site-preview/css/custom-styles.css?org=myorg The file custom-styles.css doesn't actually exist. So, ...
0
votes
1answer
33 views

How do I use rewrite in Nginx to convert an Apache redirect rule? [closed]

I need some help to convert .htaccess apache rewrite to Nginx. My WordPress website has this URL structure: https://domain.com/our-office/laos/ And I need to change to: https://domain.com/laos/ ...
0
votes
2answers
29 views

Apache Redirect: to prepend 'www' and Clean URLs

I am administrating an Apache/2.2.15 webserver with several virtual hosts. For one of these hosts I want to always prepend a missing www.. Besides that, I want to add several short-cut URLs. Here is ...
1
vote
1answer
47 views

Should I use rewrite or return or proxy_pass in nginx?

The Apache documentation pretty clearly states that mod_rewrite should only be a last resort. For nginx, the Pitfalls section has examples where the request_uri is essentially unchanged. The ...
1
vote
0answers
22 views

Apache2 mod_rewrite, handling the optional “/” at the end of a URL

I am attempting to host a single custom page to set as my homepage on my server. The real path to the page is example.com/start.html. However, I do not want this ugly URL in my homepage so I am ...
0
votes
1answer
41 views

Haproxy “use_backend” match order

I have a problem with Haproxy, it's a snippet of my haproxy.cfg below, acl url_a path_beg /a acl dom_eye hdr_dom(host) -i www.mydomin.com use_backend eye1 if dom_eye use_backend ...
-6
votes
0answers
37 views

Convert Nginx rewrite to htaccess [duplicate]

Nginx rewrite: if (-d $request_filename) { rewrite ^/?$ /get_doc.php last; break; } if (!-e $request_filename) { rewrite ^/?admin /get_admin.php last; rewrite ^(.*)$ ...
0
votes
1answer
80 views

Correct rewrite syntax to remove index.php

I got an nginx vHost that hosts: a CMS in / a magento shop in /store Things are running fine except one thing: Removing index.php from the URL. At the moment the following URLs are working ...
0
votes
0answers
41 views

Rewriting a file location with web.config wildcard

A sample location of a file is: /sites/default/files/reports/2010_Audit_Summary_Report.pdf I want to be able to access this same .PDF but with a path of: /reports/2010_Audit_Summary_Report.pdf I ...
-1
votes
1answer
47 views

Really struggling with nginx rewrites to https [closed]

I hope someone can help. I am new to ubuntu and nginx and have set up my own server (with the help of various guides around the internet) Here is my setup. ubuntu server 14.04, nginx, php5 fpm, ...
0
votes
1answer
30 views

rewrite rule is ignored

I have some problems with rewrite rule. I have 2 scripts, article.php?url= and product.php?ulrprodus= and I want to setup for them rewrite rules like below: My Rewrite rules: RewriteEngine On ...
0
votes
0answers
21 views

Apache rewrite isn't redirecting on ec2

I'm using Elastic Beanstalk with Amazon. I'm trying to setup Apache virtual host on the ec2 instance. No matter what I try, it doesn't seem to work. I'm using the following examples. ...
0
votes
1answer
72 views

Joomla URL Rewriting works automatically in Nginx

This is driving me nuts and I dont understand how this works automatically. I have nginx as my web server and I have installed Joomla that has URL Rewriting which removes the index.php from the URL. ...
0
votes
2answers
58 views

Folder outside of root folder and URL Rewrites

is the following scenario possible and how do I archive that in a shared hosting environment? I have a Wordpress installation which resides in, say, /httpdocs/wordpress My domain points to this ...
0
votes
2answers
33 views

Apache Alias to link to another DocumentRoot

I have a WordPress installed in /var/www/wordpress/ and my own code in /var/www/project/ Now comes the following problem: When I try to access example.com/client/ or example.com/admin/ it should link ...
0
votes
0answers
15 views

Rquested URL and physical path mismatch in IIS 7

I have deployed a new windows 2008 r2 server with iis 7 I'm facing difficulties with CGI ( perl ) domains My domain uses " discusware application " which stores the contents under " cgi-bin " folder ...
1
vote
0answers
108 views

IIS 7.5 URL Rewrite domain redirect

I am trying to figure out why the following code does not work. This is a copy of my web.config file: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> ...
0
votes
1answer
16 views

Apache redirect and pass query string on to remote host

I'm hoping this is super easy for someone. I need to create a redirect in apache where... http://something.com/a/1234567890 -> http://other.com/a/1234567890 http://something.com/a/8971347873 -> ...
0
votes
1answer
111 views

Using IIS URL Rewrite to redirect from one sub domain to another

I'm trying to set up IIS to redirect traffic from https://sub.foo.com to https://www.foo.com, but NOT redirecting any traffic to https://sub.foo.com/bar. The regular HTTP redirect module doesn't allow ...
0
votes
1answer
51 views

Nginx does not redirect with rewrite

I have a nginx + php on windows server configured. I work on an MVC framework with url rewriting, the problem is that my server does not resolve the addresses. Quite simply, this is my code: server { ...
-1
votes
1answer
56 views

Redirect all traffic to https apart from a single URL with Apache [duplicate]

I want all traffic to the non-https example.com and www.example.com to be redirected to the https www.example.com with the exception of a certain path, i.e. http://www.example.com/import , ...
1
vote
1answer
57 views

nginx - proxy pass without redirection

I have a website in AngularJS. Site uses hashbang mode and I am currently having a situation with prerendering. My website has an URL like this: http://www.watchawearin.com/#!/item/511 and I have a ...
0
votes
0answers
15 views

Redirect an old existing opencms url to new joomla url

I am currently working on redirecting the old url of one of our opencms site to the new url which is in the joomla platform. I've been trying for some time now but I can't seem to get it. I have tried ...
0
votes
0answers
48 views

HTTPS on RoundCube & Phpmyadmin

Since 2 months we ordered a new server from OVH. Installed this server with the OVH DirectAdmin image and configured everything like it should be. However there is just one little problem. When my ...
0
votes
1answer
57 views

IIS 7.5 URL Rewrite and 404 Not Found

I'm trying to setup a reverse proxy using IIS to proxy request on port 80 to a local virtual machine on port 8080. The rewriting rule was setup using IIS GUI "Reverse Proxy" rule. However it work very ...
1
vote
3answers
133 views

Apache Rewrite rules for SSL in sub domain

I have a web site deployed that uses kohana and URL rewriting to make the URLs more restful. This works fine. I also have Moodle installed in a sub directory on the same server and a subdomain ...
0
votes
1answer
110 views

With nginx serve a custom 404 page with header 404, without changing the browseraddress

How do I force nginx to serve a custom 404 page while responding with a 404 header, without changing the address of the browser so the user can easily retype? I tried this at my testsite (added after ...
-1
votes
1answer
41 views

Apache mod_rewrite to Nginx rewrite

I have a virtual private server with whm/cpanel. I have installed nginx_admin plugin. The plugin has created virtual host files (example.com, *.example.com and manage.example.com) In my old apache ...
1
vote
0answers
26 views

Complex IIS URL Rewrite

I've beat my head against Google trying to get this to work, but I suppose I just don't fully understand the rewrite engine or I stink at regex. Here's my scenario, though. I'm using IIS 7.5 with URL ...
0
votes
1answer
19 views

GIF loses mime type with Apache rewrite

Got problem with a gif that loses it's animation with the rewrites I'm doing. RewriteRule ^journal/(.+)\.(jpeg|jpg|png|mp4|webm|ogv)$ app/uploads/journal/$1 [QSA,L] RewriteRule ^journal/(.+)\.(gif)$ ...
0
votes
1answer
46 views

Redirect multiple browser requests to one site with IIS URL request

we have a web server with several websites. Of these, only one site has real content, the other sites are used to redirect requests to the content site. This is done by the IIS http redirect. ...
0
votes
1answer
19 views

Route request to Tomcat only if file doesn't exist on disk

I have Apache in front of my Tomcat installation as a reverse proxy. Most URLs are routed to Tomcat by a JkMount directive in Apache. For one URL pattern I'd like Apache to route requests to the ...