Questions tagged [rewrite]

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.

2112 questions
0
votes
0 answers

IIS Setup Redirect traffic from webserver to app server

I have done quite a few setup which involved hosting applications in IIS and configuring them accordingly, but now I have a different situation ... I have 2 web servers which don't host any applications , those are load balanced by Cisco ace, and we…
0
votes
2 answers

Rewriting URL on Dreamhost

I am trying to rewrite a URL for a Dreamhost served website. So basically I want to do the following: Rewrite only URLs that start with an x! URLs like this http:// domain.com/x23 should be rewritten into into http://…
0
votes
0 answers

nginx catchall reurns bad gate way with $host in proxy_pass

I am currently using the following virtual server proxy setup on my development environment the defined virtual servers work fine but i am coming up with a bad gateway error when i hit my catchall The idea is to use nginx as a front end to run IIS…
0
votes
0 answers

Nginx: How to access my reverse proxied sites via separate subdirectories

I have 2 web applications that I want available under http://example.com/demo1 and http://example.com/demo2. My config below correctly reverse proxies to each site, and the site is mostly functional, but some API requests from my web application are…
modulitos
  • 335
  • 1
  • 3
  • 16
0
votes
1 answer

Ngnix rewrite with catchall server_name

Im trying to do a rewrite based on a catchall server name. So I would like any domain that hits this server for example demo.example.com to be rewrote to example.org?site=demo.example.com Currently I have the catchall server setup as server { …
Aden
  • 1
0
votes
1 answer

What is the nginx version of these .htaccess rules?

How should I rewrite this htaccess rules to nginx kind of rules: RewriteCond %{REQUEST_URI} !^/?puppy/index.php$ RewriteRule . /puppy/index.php
0
votes
3 answers

Rewrite in Nginx Does not work for POST request

I have two VPS(one is for fail over), both running Nginx as a Load balancer for backend servers. Also, I have Enabled and configured SSL for my domain(registered on GoDaddy.com) on Nginx. Since I am using DNS A records to configure the domain for…
0
votes
0 answers

Nginx: Redirect subdomain to path

This is very similar to the question at https://stackoverflow.com/questions/14491944/nginx-convert-subdomain-to-path-component-without-redirect, however I need it to be a permanent redirect (not proxy), and the subdomain can be one of about 15…
SteveEdson
  • 1,539
  • 3
  • 12
  • 23
0
votes
1 answer

How to rewrite this url in NGINX

I have multiple urls in this manner. http://domain.com/something/static/variable/ But now I want to redirect the url above to http://domain.com/anything/static/variable/ I tried location /something{ rewrite ^…
0
votes
2 answers

Apache mod_rewrite : RewriteRule to pass requests tomcat application

I am having difficulty defining a correct RewriteRule to forward requests to an application running in tomcat. I have apache with mod_rewrite enabled as well as tomcat setup with an application mounted with mod_jk. Without a virtual host, I can…
Mike Croteau
  • 101
  • 4
0
votes
1 answer

nginx: url rewriting not working

I'm using Jelastic with nginx 1.6.1 and would like to use friendly urls without the .php extension. So if someone visits for example https://domain.com/faq.php nginx should rewrite it to https://domain.com/faq and displaying the content. I spent a…
0
votes
2 answers

Nginx rewrite: replace - with /

I set up ghost blogging platform. It doesn't allow to insert «/» signs in article links, but I want them to appear in my links, so I want them to be fixed with nginx rewrites. The link in a browser looks like…
Tomas Morgan
  • 111
  • 1
  • 4
  • 12
0
votes
1 answer

Nginx Rewite - Matching End Urls not working

Trying to redirect urls like these: http://example.com/vehicles/cars/author/xyz http://example.com/plane/author/xyz to these: http://example.com/profile/xyz I tried this Nginx Rewrite, but its not picking up the match and redirecting: rewrite…
Neel
  • 1,441
  • 7
  • 21
  • 35
0
votes
1 answer

Nginx: redirecting a directory to a virtual server

I have two Nginx virtual servers: server { listen 80 default_server; server_name antergos1; root /data/ } server { server_name nagios; root /usr/share/nagios/share; } Now, I need to access the…
aag
  • 407
  • 1
  • 6
  • 19
0
votes
0 answers

How to rewrite request for subdirectories using apaches' mod_rewrite?

My document_root is /home/john/public_html. I need the URL example.com/subdir/index.php to be handled by the file /home/john/public_html/index.php. This is what I put in /home/john/public_html/.htaccess: RewriteEngine on RewriteRule ^.+$…
GetFree
  • 1,500
  • 7
  • 23
  • 37