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

Nginx rewrite part of URL

i'm trying to make a redirects from URL's with option ID to URL's with option URL_key i've assigned. I have two column table with ID i'd like to substitute and URL_key as substitute. 11337 bar ...
1
vote
1answer
33 views

Rewrite a url to a a new URL and then send the new URL to a PHP script

I have URLs that contain a cache busting string. I want to rewrite these URLs without the cache busting string, and then send the rewritten URLs that match a certain criteria (e.g. audio/video files) ...
1
vote
1answer
42 views

nginx location and root settings dont work

I am trying to rewrite every file after cdn.minora.me/forum/ to another directory: server { listen 443 ssl; listen [::]:443 ssl; ssl on; ssl_certificate ...
0
votes
0answers
22 views

nginx rewrite keeping subdomain

I have a nginx server and several domains connected to it. I would like to replace all http request with a https request to one specific domain (for which I have a certificate). Example: Say I have a ...
0
votes
0answers
17 views

apache mod_proxy_html to rewrite wsdl

I'm trying to configure mod_proxy_html on apache httpd 2.4.9 to rewrite an element of an xml document returned from a webservice that is reverse proxied using mod_proxy_balancer <description ...
-1
votes
0answers
11 views

RewriteRule in Apache [duplicate]

I want to rewrite some urls. Example domain.com/planning into domain.com/index.php?page=planning RewriteRule ^planning+$ index.php?page=planning [L] But also domain.com/planning/add into ...
-1
votes
0answers
14 views

Apache rewrite rule for image [duplicate]

Can someone tell me how to write a rewrite rule for apache which makes http://web.site.com/folder/--411.jpg go to http://web.site.com/folder/logo.jpg So if the file at the end is JPG/PNG/GIF and ...
0
votes
0answers
16 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
2answers
55 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
23 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
9 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
41 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
25 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
38 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
38 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
47 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
38 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
20 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
32 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
37 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
25 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
46 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
10 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
31 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
34 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
30 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
51 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
45 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
82 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
42 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
22 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
97 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
59 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
34 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
17 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
113 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
18 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
137 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
52 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
58 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
58 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
17 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
49 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
66 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 ...