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

Multiple domains pointing to one server. Using a rewrite rule to set preferred domain

I just launched a new website for a client. As part of the new launch I want to try and sort out their domains. Currently they have 3 domains all pointing to the same server which is bad when it comes ...
0
votes
1answer
19 views

How to redirect to different domains based on if there is any text after .com/?

I have some basic competency here, I can do one of these or the other, but cannot figure out how to do both: If a user goes to www.example.com/anydatahere, I need to pass the anydatahere to a purl ...
0
votes
0answers
30 views

Translating DNS Server Replys because of multiple NAT Networks

I am planning and building a large infrastructure wich different natted networks. Lets say I have a datacenter network 10.0.0.0/24 and I have many different customer networks that could be anything (...
0
votes
1answer
44 views

nginx: How do I redirect all requests to the frontpage?

I am shutting down a website and am stumped on a really simple problem; I need to redirect all URLs to the homepage (except, obviously, the homepage itself). I thought this should work, but it causes ...
1
vote
0answers
65 views

Nginx url rewrite stops going through location code

I'm trying to configure my Phalcon (php framework) project on Nginx. Unfortunately I can't manage to make the rewrite work. In order to better understand my problem please check out the config file: ...
1
vote
1answer
52 views

Wrong or misconfigured rewrite by nginx 1.8

I have the 2 nginx's conf files ssl.conf and default.conf under /etc/nginx/conf.d/. The first file handles incoming http request. It rewrites the http request to https. And the ssl.conf file handles ...
0
votes
1answer
88 views

Joomla “pretty urls” with nginx allow index.php/pretty/url as well as index.phppretty/url (notice the absence of slash)

I am trying to install my first LEMP stack and, after a lot of hours and reading, it's working pretty well (Damn, the www-data group write permissions issue was a tough one). Anyway, my Joomla site ...
2
votes
1answer
118 views

Apache RewriteRule 502 Error on dev server, works on live

I'm on Apache 2.2.15. My vhost.conf contains a RewriteRule to handle article URLs; # handling for neat article titles RewriteRule ^/news/[0-9]{4}/[A-za-z]{3}/([0-9a-zA-Z-]*)/([0-9]{4})([0-9]{6})/?$ "/...
0
votes
0answers
69 views

Rewrite /a/1/2 to /a.php using Nginx

I'm taking over a really old app and migrating it from apache to nginx. What I currently have. This works: # catch specific paths, rewrite to first segment # /a/1/2 => a.php # /b/3/4 => b.php #...
0
votes
1answer
20 views

Redirect loop in apache rewrite rules

I am trying the following redirect rule, but it ends in redirect loop. Is there any way to avoid it? There are multiple domains and based on the file accesses respective file should be served from ...
-1
votes
2answers
23 views

Rewrite domain to cut its URI [duplicate]

I need to set up the domain.com/wp1/ to be shown like domain.com/ I have tried to set up any rewrite in the past hours, but no success :( P.S. There is a wordpress installed in the public_html/wp1, ...
1
vote
0answers
105 views

How to SOAP over a proxy server I own(configuration)?

I have a server called http://SERVER-A.com which sends a SOAP request to a third-party address. Also I have another server called http://Server-B.com which I want to configure as a proxy server. I ...
1
vote
0answers
21 views

Make Varnish check for html static before serving

I was thinking of writing some logics to my application so that it can write the static page content to s3 or some CDN and serve primarily from there. But am not sure if this is possible. For ...
0
votes
0answers
50 views

IIS7 (Azure) HTTP -> HTTPS redirect fails with certain query strings

These are how my rules are setup for a NodeJS application running on Azure: <rewrite> <rules> <clear /> <rule name="Force HTTPS" enabled="true" stopProcessing="false"&...
-3
votes
2answers
32 views

apache conf entry does not work but does in .htaccess [closed]

i am running: Server version: Apache/2.2.15 (Unix) i have a custom security conf file on a shared server. i placed the following entry at the top of the file with no joy, and i also placed it at ...
1
vote
2answers
55 views

Postfix rewrite recipient based on domain

I'm looking for a postfix configuration to create recipient rewrite rules based on the recipient domain name including catch all for domains not found in the "not rewrite"-list. For example: laber@...
0
votes
0answers
38 views

Nginx convert URL to path on server

I have a problem with converting URL into path to file. For example. I want open file /var/www/html/dir1/dir2/dir3/file_one.conf in browser by link http://domain.com/dir1.dir2.dir3.file_one ...
-1
votes
1answer
53 views

Converting .htaccess rule to nginx not working

.htaccess rules: RewriteEngine On RewriteCond %{QUERY_STRING} (.*) RewriteRule ^yon-(.*).mp4$ index.php?videodata=$1&yonlendir=true&%1 [NC] RewriteCond %{QUERY_STRING} (.*) ...
0
votes
1answer
23 views

How is leading slashes handled in server and in client?

I am trying to create a RewriteRule, but it's unreliable and I can't figure out what is happening. Here's my rule: RewriteRule ^docs/(......)/$ index.php?docid=$1 [L] the problem is leading slashes,...
1
vote
1answer
195 views

NGINX URL with parameter rewrite to URL without parameter

I have an NGINX background on my server. I cannot figure out why my rules doesn't work. How can I redirect or rewrite it so I could open URL with the same content, for example: http://www.example....
0
votes
2answers
60 views

Nginx URI redirect (regular expressions)

I plan to rename one of my site's menu and I'll need to catch the old SEF urls and rewrite them to the new ones. One portion to change is in the middle of URL (old to new) and the other is at the end (...
0
votes
0answers
8 views

combining 2 rules into 1 to account for .aspx extension

I have 2 re-write rules in IIS7 to account for a url with or without .aspx extension. <rule name="Product .aspx" stopProcessing="true"> <match url="^(.*)Products/...
1
vote
1answer
29 views

Redirect to HTTPS and subdirectory is visible [duplicate]

I am forcing HTTPS and redirecting to subdirectory with: RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301] RewriteCond %{HTTP_HOST} ^domain.com$ [NC,OR] ...
1
vote
2answers
180 views

nginx -> serve different files using try_files based on cookies (conditions, if, then, else)

I need to configure an nginx server so that: If user has a specific cookie so the server must send a file, else the server must send another one. I read plenty of related articles, but nothing helped, ...
-1
votes
1answer
33 views

What is the Ideal way to spoof files in nginx (alias, try_files or rewrite)

I'm trying to spoof file location by sending long url to the server, the server translate it to the proper php file and return the result, example: I send a link like this: http://example.com/...
-1
votes
1answer
67 views

nginx rewrite based on args

got links on old site like /aaaa/bbbb/cccc.php?SECTION_ID=112233 So i need redirects based on value of SECTION_ID for example /aaaa/bbbb/cccc.php?SECTION_ID=112233 leads to /aaaa/cccc/, but /aaaa/...
0
votes
0answers
117 views

How to haproxy rewrite http header

I have 1 haproxy server hosting for website.com and 1 nginx server hosting for static.website.com . I want when haproxy receive http request for http://website.com/static/image.jpg it will rewrite: ...
0
votes
1answer
26 views

nginx regex rewrite rule for images

I have the following URLs: www.example.com/data/images/13122013-002_IM1621.jpg www.example.com/data/images/13122013-002_IM1622.jpg www.example.com/data/images/13122013-002_IM1622.jpg On the file ...
0
votes
0answers
112 views

Appending URL subdomain as URL path in HAProxy

I want to convert following URL: http://subdomain.example.com/a/b/c To this: http://example.com/subdomain/a/b/c In HAProxy. Thanks a lot
0
votes
1answer
109 views

VirtualHost/htacess : how to point a subdomain to an url parameter?

I must to create a multi-languages website. In order to achieve this aim, I want to point subdomain representing a language to the 1rst url parameter (GET variable) of the domain in my virtualhost ...
0
votes
1answer
152 views

Configuring IIS rewrite module to redirect any host name to a specific host name

I have a website whose name I am changing from example.com to newexample.com. My thought process (please comment on this as well, as my approach may be incorrect) was to configure permanent a ...
0
votes
0answers
70 views

IIS url rewrite with rewritemaps non working

on IIS 7 windows 2008r2 we are have URL rewrite module working with external rewrite config files working fine. When I try to add an extral rule to redirect a special path to another site it doesn't ...
0
votes
1answer
19 views

proxy with rewrite including headers

I'm trying to figure out the easiest way to proxy a wordpress site to a subdirectory of another site. So, I have a wordpress site articles.blah.com/subdir/. It writes html with absolute paths like ...
0
votes
2answers
111 views

IIS reverse proxy / re-write rule to redirect requests to another port

I am attempting to rewrite requests for http://redmine (where IIS is bound) to http://web01:8080/redmine (where apache is bound and ruby is serving redmine). Noet that I also have an A record binding ...
-2
votes
1answer
86 views

remove everything but domain name from url

I am looking if the is an easy way to keep the webpage always with the URL like: http://example.com at the time there are request like http://example.com?target=dirigido http://example.com/a-quien-...
-2
votes
1answer
25 views

.htaccess rule not working [closed]

This is my .htaccess code ... the first condition is working and the other one is not RewriteEngine On RewriteRule ^([\w-]+)/?$ Page.php?PageID=$1 [L] # Process parrots RewriteRule ^([\...
1
vote
0answers
99 views

nginx proxy_pass adds port number to URL

I have a standard Rails app deployed to Heroku. I am using custom buildpacks to install nginx so I can create some rewrite rules and a reverse proxy. I have it mostly working save for one issue. I ...
1
vote
2answers
209 views

rewrite or internal redirection cycle while internally redirecting error on Nginx

I just migrate from Apache to Nginx and trying to set up rewrite rules. I have a virtual host and this is the structure of virtual host /var/www/name-of-virtual-host/ ├── wp1 │   ├── wp-admin │   ├── ...
0
votes
3answers
58 views

Nginx rewrite and proxying

I am trying to combine these 2 Nginx location definitions into 1 location /v1/login { proxy_pass http://upstream/v1/login; proxy_redirect off; proxy_set_header Host ...
0
votes
0answers
151 views

Rewrite request from POST to GET with nginx

I've got a backend server that, for various reasons, only processes GET requests. This server is located behind nginx proxy (i.e. all access is done to nginx, which proxies it to the backend with ...
1
vote
0answers
227 views

captive portal / walled garden on pop up window on android not appearing

I don't normally ask for help, but i've been stuck on this for a couple of days - and any pointers anyone may have will be very much appreciated. I have created a wifi hotspot (captive portal / ...
0
votes
0answers
11 views

IIS Url Rewrite Rule with Conditions Not Triggering

I am having trouble with using conditions in an IIS Url Rewrite rule. I want to perform the following logic: Match any request for a URL that: begins with "tools/" does not match specific folders/...
0
votes
1answer
186 views

Redirect respecting port in the host header?

I'm often working with tunneled ports where I'll SSH forward a remote port 80 to a local port 8080. One of the interesting problems I run into is that when I have a rule like this in NGINX: rewrite ^...
1
vote
1answer
98 views

Match … character in rewrite rule with nginx

I have a problem, where someone has added a link to our site - but its getting cut off. I'm seeing in the log file, as: /info-cry%E2%80%A6 Seeing as I know what that is mean't to be going to, I'm ...
0
votes
1answer
26 views

Rewrite subdomains in Nginx

Because I don't want to use CDN anymore I would like to rewrite cdn.example.com to www.example.com. How to do this with Nginx? There is only www.example.com in my server block.
0
votes
1answer
147 views

Using IIS ARR and URL Rewrite to send Webservice requests to a new server

We are trying move our web services from Azure Cloud Services to Azure Web Apps and that would change their address but we have some clients that we are not able to update the address they are using, ...
0
votes
0answers
23 views

nginx rewrite rules for language

the effect I want: abc.com/hello => abc.com/article.php?link=hello abc.com/en/ => abc.com/index.php?lang=en abc.com/en/hello => abc.com/article.php?link=hello&lang=en what I did: ...
0
votes
0answers
10 views

Httpd RewriteMap using QueryString [duplicate]

I'm trying to redirect the following request http://host.com/foo?bar=xxx+aGVsbG8K&other=value to http://host.com/hello?bar=xxx&other=value Where aGVsbG8K is base64 encode version of hello I ...
0
votes
1answer
86 views

apache forward proxy - how to override a destination address?

I'm running apache as a forward proxy to do header injection, URL manipulation, and request logging for some Android apps and I'd need to override the destination for some requests. For example, www....
0
votes
0answers
18 views

iis 7.5 - convert rewrite rules to rewritemaps

I am using IIS7.5 and url_rewrite and I need to rewrite some urls with the following pattern: /departments/oldname1 --> /departments/newname1 /departments/oldname2/oldname3 --> /departments/...