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
2answers
40 views

Nginx Proxy rewriting with condition for domain [closed]

I am in a quite unknown situation but I believe it can be done using nginx proxy and url rewriting feature. What I want to have is: Have a website with multiple branding, so let's say I have 3 ...
1
vote
0answers
24 views

nginx prevent loss of POST parameters when rewriting uri

I would like to do some url rewriting on nginx with php-fpm. Namely, routing all requests to php scripts to a single script like: /index.php?fulluri=(originaluri) Many ways to approach the problem: ...
-1
votes
2answers
74 views

To hide “#” from the URL using Nginx

I am using Nginx web server to host my website. I need to hide "#" from URL. Actual: example.com/#page2 Requirement: example.com/page2 Our web page developer says that, here #page2 is defined as id ...
1
vote
1answer
63 views

Nginx as reverse proxy with IBM Websphere upstream

I have an IBM WebSphere serving multiple domains: x.x.x.x:8080/app1 x.x.x.x:9090/app2 ... I need to configure Nginx as reverse proxy to serve: app1.example.com app2.example.com Here is my config but ...
2
votes
1answer
33 views

Nginx rewrite filename as a directory

I want to rewrite a file name membership-list.html as a directory on the root domain as membership-list/. I had this in my config file: location = ^/membership-list.html { rewrite ^/membership-...
0
votes
0answers
13 views

IIS 8 port rewrite and ProxyPreserveHost equivilent

I've had a simple IIS 8 URL Rewrite rule in for a long time now and it was working perfectly. It basically just rewrote: http://helpdesk to http://helpdesk:8080 Has been working fine, the purpose ...
1
vote
1answer
17 views

File in the same subdirectory as the HTML in CMS

I have a CMS installation with a link such as journal.org/archives/volume136/number10/37362-49383 I want to place a few PDF files in the same directory as the above HTML such that the PDFs are ...
0
votes
0answers
26 views

How do I pass in matches via ProxyPassMatch?

I'm using mod_proxy_fcgi and I have this line in my vhost: ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/housni-test/$1 I want a URL like /media/4228dedb-9855-4894-84f5-...
1
vote
1answer
113 views

Nginx rewrite rule subfolder 404 error

I cannot figure out how should I setup my index.php file with Nginx rewrite rules that it will work like example below. If I visit the url it gives me 404 error not found instad echo 'hello'. URL: ...
1
vote
1answer
202 views

Haproxy 301 URL redirect on query string condition

Using Haproxy 1.5.12 running on Ubuntu 12.04 My website gets a lot of requests like this one: http://www.example.com/foo/bar/mypage.php?gallery=&position=3 the correct URL should be: http://...
2
votes
1answer
31 views

How to do multiple redirections with if statement in nginx [closed]

So my question is half oriented SEO half technical : I have a lot of links to redirect and instead of doing them one by one I was asking my self : Is there a way to write a rewrite rule like that (...
0
votes
1answer
2k views

NGINX - Cannot set Cache-control for redirected .js files (with alias + rewrite)

I have successfully setup an nginx server which uses both alias + rewrite as in the below configuration. Everything works except that javascript files are not enforced browser caching. Server url: ...
1
vote
1answer
1k views

Nginx Try_Files to create local content cache?

I'm trying to either serve images locally, or from a share (locally refreshed overnight). My nginx site is served across 2 or more servers, to keep all the content in sync across each server, I'm ...
0
votes
0answers
1k views

Nginx rewrite url with parameter

I hope some can help me with that: I need to redirect an url thats called inside my shop to logout customers from their account. Since I have switched to Nginx Server it does not work. I am using a ...
0
votes
1answer
92 views

Image not display after using nginx

recently i change my web server from apache to nginx, my site using using wordpress and use google drive wp media plugin to store image in google drive , after i change to nginx all image suddenly ...
0
votes
0answers
1k views

Apache redirect to change URL if user comes in on it, but also proxy redirected address

I have the following setup: Java application at www.mysite.com New angular application for part of my site www.mysite.com/details (www.mysite.com/details exists in the old site as well) In order to ...
0
votes
1answer
1k views

HSTS & redirects on IIS 8.5

I'm having a problem getting my IIS 8.5 server to behave as desired. I am attempting to host two domains on the same IP address, both on https, using separate webservers. Naturally, IIS is setup as ...
0
votes
0answers
69 views

rewrite works in htaccess but not in apache2.conf

I am trying to move rewrite rules from .htaccess to apache2.conf (at Kubuntu to use The Bug Genie software). Rewrite rules in .htaccess works fine, but after moving (and adjusting) it to apache2.conf ...
4
votes
1answer
1k views

How to change filename on the fly depending on the title args - nginx rewrite

i am serving .pdf files using nginx web server. and setting filename of .pdf file using rewrite rule , depending on the title args. what i am trying to do is, add my domain name example.com in the ...
0
votes
0answers
1k views

Cannot reset base url in apache server

I just uploaded my project on an apache server. I use angular and I set the base url in my code like <base href="/nik/awesome/"> my project is single page application, I set the routes like ...
0
votes
1answer
1k views

NGINX rewrite rule applied twice

I want to set up NGINX to serve OpenUI5 applications on development machine. I never used NGINX before, and experience troubles with rewriting URLs. As I can see from trace log, it is applied twice, ...
0
votes
0answers
1k views

How to configure each location point to a seprate upstream in nginx

How to configure each location point to a separate upstream in nginx? I need functionality like this. www.mysite.com --> 127.0.0.1:9900 or upstream. www.mysite.com/serviceA --> 127.0.0.1:9901 ...
1
vote
1answer
1k views

Nginx rewrite without redirect

I want url domain.com/foo-111 to load contents from directory /bar/111 but not change url. I created a rewrite rule but instead of loading contents of proper directory, it 301 redirects to domain.com/...
1
vote
0answers
1k views

htaccess: Is it possible to ask with rewritecond if the request was already redirect? [closed]

I'm having a redirect loop and it could be solved by asking with rewritecond if this is the first time since user request, or it's jumping already. Is it posibble to know inside .htaccess? Thanks in ...
0
votes
0answers
1k views

Ignore certain endpoints in nginx SSL rewrite rule

I am currently redirecting all traffic on my site to https using the following rewrite rule: if ($ssl_protocol = "") { rewrite ^ https://$host$request_uri? permanent; } I would like ...
0
votes
0answers
36 views

URL redirect for a domain & URL (Window Server 2012)

I am shutting down an old intranet application, and in order to please my users, I would like to have a friendly page that tells them where they need to look instead. Another team however have ...
1
vote
1answer
26 views

Nginx rewrite to remove .php from files has no effect but to redirect to homepage

I'm trying to make a rewrite to remove .php from my URLs but so far no luck. Here's what I've got so far and then my results with this config below. location ~ \.php$ { try_files $uri/ @...
1
vote
1answer
59 views

Apache redirect some url to homepage

I am trying to implement a simple rewrite, but looks like i am doing something wrong. What I am trying to do is that I have a url blog.example.com/articles/ which gives me 404 , and other urls are ...
0
votes
0answers
20 views

lighttpd rewrite in magento

I'm currently using below code in lighttpd.conf to redirect http to https. $HTTP["scheme"] == "http" { $HTTP["host"] =~ ".*" { url.redirect = (".*" => "https://%0$0") } } However,...
0
votes
0answers
14 views

Apache rewrite config stops working after migrating to new system

I need help with mod_rewrite commands. After migrating to a new server on Apache 2.4.6 my rules stopped working. Basically I need to divert all traffic to HTTPS except link that contains */api/1.0/...
1
vote
2answers
54 views

Migrating rewrite rules under subdirectory from Apache to IIS

In the old Apache hosting, we had the following .htaccess file inside public_html/adm: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{...
0
votes
0answers
33 views

Application Requst Routing (ARR) proxy chain - 407 proxy requires authentication

Is there any way to provide credentials to the upstream (chained) proxy in ARR? I am using URLRewrite and ARR to reverse proxy an internal HTTP request to an Internet Site. In the corporate ...
0
votes
1answer
132 views

Nginx rewrite root to sub-folder without changing server root

I am trying to move an old app to nginx from apache but I froze on here. The /.htaccess RewriteEngine on RewriteRule ^(.*) public/$1 [L] The /public/.htaccess Options +Indexes +FollowSymLinks -...
0
votes
1answer
26 views

Nginx search query rewrite rule

Currently I have my rewrite queries like so rewrite ^/category/category-name /index.php?route=information/category-name last; This works fine for my pages that are static and i know the name to. ...
0
votes
1answer
53 views

Nginx specific rewrite [closed]

i am confused in nginx rewrite. please help me if can..Thanks you xxxx.conf #vhost-xxxxx server { listen 80; server_name xxxx.xxxx.com; root /var/www/html; ...
0
votes
0answers
6 views

htaccess rewrite incoming links to new one [duplicate]

I'm having a problem with site migration and old links. Now, its not just a server migration, it was also a CMS migration. Site went from umbraco (asp.net) to wordpress. Problem is that google indexed ...
2
votes
1answer
96 views

nginx single page js app pushstate vs wordpress rewrite rules

I would like to add: /client subfolder containing backbone js app (with pushstate) /admin subfolder containing backbone js app (with or without pushstate) And when I open my http://example.dev/client ...
1
vote
0answers
34 views

forward proxy with URL rewrite

Apologies if this is a newbie question -- I can't believe its hard, so I must be missing something. I have an application at https://example.com/application/* . It makes use of PNGs sourced from ...
1
vote
0answers
31 views

Copy PHP website to virtual folder under IIS 8.5

I would like to make an existing PHP Website (Apache) run on a virtual folder under IIS 8.5. With the help of some nice online tools I translated the following .htaccess content: <IfModule ...
-1
votes
1answer
38 views

Nginx redirect 2 level subpaths

I have the following redirect rule: rewrite ^/path1/(.+)$ /path1/index.php?/$1 last; rewrite ^/path2/(.+)$ /path2/index.php?/$1 last; rewrite ^/path3/(.+)$ /path3/index.php?/$...
0
votes
1answer
55 views

nginx rewrite link with wordpress

I have broken link on my WP blog, which is on this route www.site.com/wp-content/plugins/download-monitor/download.php?id=1 But when I want to redirect it to completly new site, my rewrite rule ...
1
vote
1answer
32 views

Haproxy redirect to different subdomain

I am trying to redirect one url example.com/blog to blog.example.com using haproxy. I have applied following rule: acl blog_path path_beg -i /blog/ redirect location http://blog.example.com/ code ...
0
votes
0answers
14 views

url rewrite - 2 rules, one rule triggers other rules response

I have 2 rules in play, one at server level, to check for exploits n hacks across the whole server, which if triggered redirects to a url with certain parameters which logs the info of the hack. The ...
-1
votes
1answer
33 views

rewrite after rewrite in nginx

i have: nginx server site based on joomla rewrite like this in server block location / { # Support Clean (aka Search Engine Friendly) URLs try_files $uri $uri/ /index.php?$args; } this ...
0
votes
0answers
35 views

Rewrite Query String to Display as Subdomain in Browser?

I have search every possible resource however, I have not been able to find the help i need so i thought i would ask here. I am not highly educated in .htaccess rewrites so please bare with me if i ...
1
vote
2answers
115 views

Clean URLs and php extension on nginx

I've looked at dozens of other questions and references on the web - and by all my calculations, my setup should work, but it doesn't. I have nginx installation with php-fpm. If I try to access a ....
-1
votes
1answer
42 views

Apache to nginx migration: friendly urls. Rewrite and post data

I am migrating a little API from apache to nginx and I have changed the htaccess file to location rules in nginx config file. I have a POST request that is loosing the post data. This is the ...
2
votes
0answers
79 views

Combined redirects in Nginx

We are using Nginx and want to reduce the number of "chained" redirects we have. So, for example: URL A - http://www.sitename.co.uk/SHOPPING-CATEGORIES/product_name redirects to its https version (...
0
votes
1answer
59 views

Subdomain With Custom URL/Domain

I have a subdomain called 'mysite' at this.example.org/mysite which needs to resolve to mysite.org in the address bar. Can this be accomplished with .htaccess in the mysite public_html folder, or ...
-1
votes
1answer
42 views

Case insensitivity in nginx [duplicate]

We have several SEO pages like: http://www.example.com/PageOne.html Which we redirect in config like: location = /PageOne.html { rewrite ^/(.*) /seo.php?id=1 last; } Problem is if a user ...