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

Redirect URL with IIS 8.5

I would like to redirect/forward a URL on my testdomain. The URL is for example: http://www.mydomaintest.com/feed and I would need that to forward to http://www.mydomaintest.com/feed/stories. I have ...
1
vote
1answer
15 views

Removing path segments with encoded values for nginx

I have a location block like the following location ^api/([^/]+)(/.+)$ { set $my_host $1; set $my_path $2; proxy_pass http://$myhost$my_path$is_args$args; } This works well for most ...
0
votes
0answers
27 views

friendly urls with / at the end of the url

I'm trying to set up the file "nginx.conf" for friendly urls. I have the following urls: / -> /index.php /view/ -> /view/index.php /view/client/ -> ...
0
votes
0answers
25 views

301 Redirect from a url pattern with nginx

I'm trying to redirect www.mysite.com/blog/ and www.mysite.com/blog/* URLs to a single page www.mysite.com/news/ I tried to achieve this with the following (inside a server block): location /blog/ { ...
0
votes
1answer
29 views

Nginx Url Rewriting: Remove folder from the url

Im trying to rewrite a url like below: https://example.com/products/xperia-z5/ to--> https://example.com/xperia-z5/ But i want in the same time the url https://example.com/products/ to be ...
0
votes
1answer
25 views

Redirect all the traffic from multiple domains to single domain using htaccess

I have hosted multiple websites on my server all sharing the same code base having one htaccess. I need something like this. if (domainname != example.com) redirect to example.com if there ...
1
vote
2answers
33 views

Nginx Proxy rewriting with condition for domain

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
20 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
63 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
25 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
29 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 ...
0
votes
0answers
8 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
18 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 ...
0
votes
0answers
6 views

Which is more SEO friendly, redirect or rewrite? [migrated]

On Apache 2.4, which is better for multiple migrated URL's in terms of SEO, 301 Redirect or rewrite? I have ~50 URL's
1
vote
1answer
28 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
57 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: ...
2
votes
1answer
29 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
823 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
407 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
431 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
70 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
430 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
424 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
53 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
594 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
404 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
415 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
409 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
424 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 ...
1
vote
0answers
404 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
399 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
17 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
19 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
55 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
12 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") } } ...
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 ...
1
vote
2answers
35 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
16 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
58 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
43 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
53 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
23 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
21 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
32 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/(.+)$ ...
0
votes
1answer
50 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
22 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
11 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 ...