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

Why nginx redirects after form submit?

I have conf: location ~ ^/secret(.+) { rewrite ^/secret(.+)$ /phpmyadmin$1; } location /phpmyadmin { root /usr/share/; index index.php index.html ...
0
votes
1answer
126 views

Nginx 301 redirect of a single URL

I am trying to redirect a specific URL like: http://www.domain.com/cadena-de-metas I am doing this via my config file in /sites-available/ if ( $request_filename ~ cadena-de-metas/ ) { ...
0
votes
0answers
8 views

Redirect to URI + Query String using .htaccess [duplicate]

I am trying to setup my WordPress to redirect URL to URL+QueryStrying. I want to redirect http://example.com/path/uri/ to http://example.com/path/uri/?query_string=true I have tried different ...
0
votes
1answer
30 views

URL rewriting Issue with html pages in IIS6 asp.net (2.0) application

I am using URL rewriting for asp.net (2.0)application on Server 2003 with IIS 6 Website url example mywebsite.com and mywebsite.com/blog. mywebsite.com runnig with.aspx and .html pages Database: SQL ...
0
votes
0answers
12 views

Apache ProxyPass rules to stop at first match [duplicate]

I want to stop ProxyPass rules to stop executing at first match. I've given some rewrite rules in the end. So Rewriterules are getting executed all the time. Below is the two lines, i want to work ...
0
votes
1answer
22 views

Wordpress SSL switch/rewrite base on request (fixing insecure content)

I have a small Wordpress site to share my hobby. My webhost is SSL enabled and I successfully set the "force SSL login" option. But because I started without SSL there are mixed protocols in the ...
0
votes
2answers
51 views

Why rewrite(nginx) redirects with 301 code?

I have this configuration: location ~ ^/myway(.*) { rewrite ^/myway(.*)$ /anotherway$1; rewrite_log on; error_log /var/log/nginx/errors notice; } location /anotherway { ... ...
0
votes
3answers
122 views

How to make Apache’s mod_rewrite redirect over HTTPS by default?

Let’s say I have a website that is available over HTTPS, e.g. https://example.com/foo. Consider the following .htaccess: RewriteBase / RewriteEngine On RewriteRule ^foo$ bar [R=301,L] Now, when I ...
0
votes
1answer
40 views

Redirecting all requests on one domain to https non-www

I have an ISPConfig 3 site running on one domain. I have multiple vhost files for the different applications I run through Apache. I want to enable https://example.com/%QUERY_STRING% on every request ...
0
votes
0answers
31 views

How to redirect single domain and URL using IIS URL Rewrite?

We have an IIS setup that's bound to multiple host names. There's a canonical domain rewrite rule configured to redirect all host names to one primary host. We want to add a specific redirect for one ...
3
votes
1answer
131 views

Apache Directives Ordering: Global, Pre-VHost, or in Directory blocks

I'm setting up my first virtual server from scratch (provider name omitted but it's a 'droplet'). I've been using WHM for a while and I feel I'm fairly familiar with it. Specifically, it's a Debian 8 ...
1
vote
0answers
97 views

Apache exit signal Segmentation fault when mod_rewrite and fcgi are used together

I am using Ubuntu 15.04, Apache/2.4.10. I enabled mod_rewrite and mod_proxy_fcgi. My apache config for fcgi is: ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/myapp/$1 ...
0
votes
0answers
72 views

IIS ARR URL Rewrite giving issue for larger OwnCloud uploads

I have a domain with sub domains set-up for owa.domain.co.uk owncloud.domain.co.uk wiki.domain.co.uk All these domains forward to my IIS 7 system from there I am using ARR and URL Rewrite to ...
3
votes
1answer
51 views

What is the reason for redirecting the landing page of a site to a URL with '/#/' at the end?

What is the reason for redirecting the landing page of a site to a URL with '/#/' at the end? The system administrators at my company use a Apache reverse proxy, and they always redirect all the ...
3
votes
1answer
42 views

nginx rewrite of url with query string

I have been googling for a good while and can't figure this one out. It seems simple, and I am sure it is, but I am not a server expert. My url is: http://www.example.com/blog/?tag=Word1+Word2 Some ...
0
votes
0answers
60 views

IIS Url Rewrite and Authorization header

I configured IIS to rewrite all requests to http://localhost/rest/ to go to http://localhost:9955/RestService/v2/. All works fine. However, when the request sent from the browser contains ...
1
vote
1answer
35 views

How to set certain key-value pair to every html sent by nginx without lossing other key-value pairs?

I want to set the value of mode in every html's search string using nginx. I wrote codes like this: if ( $arg_mode !~ test ){ rewrite ^(?:/(.*)\.html)?$ /$1.html?mode=test? redirect; } But ...
1
vote
0answers
23 views

mod_rewrite and double slash issue

I am getting mod_rewrite and double slash issue can you please help me out. # ProxyPass /balancer-manager ! RewriteRule /phoenix/^(.*) ...
0
votes
0answers
53 views

IIS Rewrite: Redirect HTTP to HTTPS and vice versa, but not all sites

I'm struggling with redirect from HTTP to HTTPS and vice versa. What I want to achieve is the following. Redirect all ASPX-Pages from HTTP to HTTPS with the following exception. don't redirect ...
0
votes
0answers
28 views

Apache - how to match against a variable within regex?

Trying to match a variable against another in a directive does not work: RewriteCond %{REQUEST_URI} /absolute/path/%{REMOTE_USER}/ Trying the If directive in Apache 2.4 doesn't work either: <If ...
0
votes
0answers
78 views

Nginx proxy_pass for relative paths

I currently have an Nginx configured this way. location /ui/ { proxy_pass http://ui:8888/; } This works but I'm having problems with retrieving some resources from the service, ...
0
votes
0answers
25 views

RewriteRule — how to serve file from subdirectory, but show requested URL using only .htaccess

I want to be able to switch between dev/live subdirectories without altering the URL that displays in the browser and without having to modify httpd.conf. I want https://domain.com to actually serve ...
2
votes
1answer
25 views

Something like foreach in htaccesss?

I am in this situation: url: domain/var1/var2/var3/.../varn And I want to change that url in: url: domain?v1=var1&v2=var2&v3=var3/.../&vn=varn I found this way: RewriteRule ...
0
votes
1answer
36 views

Set header based on %{REQUEST_URI}

I am trying to set a header based on the URI of a particular page. I access a page using chrome. Inspect element and see that my URI header is giving the value /bst/index.html Now in my Apache config ...
0
votes
1answer
78 views

mod_rewrite not working for apache alias

I have created a documentation wiki that i want to attach to my main site using an Alias for the virtual host. This allows me to access the wiki by going to website.com/documentation. I have ...
0
votes
0answers
38 views

Simple URL Redirection in IIS

I've made the following rule in the web.config in the wwwroot folder: <rewrite> <rules> <rule name="umo to google" patternSyntax="Wildcard" stopProcessing="true"> ...
0
votes
1answer
182 views

Nginx config for Magento subfolder multistore

I'm moving from subdomain to subfolder. I have multiple subfolders for several countries. I changed the domain in the Magento administration. But the Nginx rewrite doesn't seem to work. I have 1 ...
1
vote
1answer
122 views

Nginx Config Location Regex With Language Code In Url

Trying to achieve constant language code in url's 1st segment with nginx regex location configuration and could not find the correct syntax. Necessary result: example.com stays example.com ...
0
votes
1answer
30 views

Redirect 404 to parent category

If a user hits a 404 I'd like the user to be redirected to the parent category. The expected behaviour I'm looking for is the following examples www.test.co.uk/category/product404page > ...
0
votes
0answers
25 views

implementing friendly urls on an nginx-ubuntu server

Currently my website's url are like this: https://www.mywebsite.com/fx/?category-name=abc (category page) https://www.mywebsite.com/fx/?category-name=abc&article-name=xyz (article page) The ...
0
votes
1answer
46 views

Redirect 404's within a certain directory to index.php

I'm trying to redirect all 404 messages to the index page, but only within certain directories/categories. For example 404's within the following dir's will display as normal www.foo.com/ ...
0
votes
0answers
12 views

Rewrite Rule from sub directory web root [duplicate]

I want to make a one time change to my website URL structure. I want to rewrite URLs from /2015/11/sample-post/ to /sample-post/ - I don't care about the existential dilemmas caused by such a ...
1
vote
1answer
45 views

Nginx always rewriting to ssl even on non ssl sites

I have a page example.com, which has ssl certificates setup and everything is working fine. Here is the ssl part of the config: server { listen 80 default_server; server_name www.example.com ...
1
vote
1answer
50 views

Apache rewrite rule to iis

I am trying to move site on apache to iis 8.5 All is ok, but 1 rule failes my site to run properly RewriteCond %{REQUEST_URI} !\.(js|css|jpg|jpeg|gif|png)$ [or] RewriteCond %{REQUEST_URI} ...
0
votes
1answer
15 views

How do I prevent RewriteRules conflicting

I have three RewriteRules I am trying to implement but I cannot get all 3 to work together: RewriteRule ^products$ http://%{SERVER_NAME}/en_ca/products [L,R=301] RewriteRule ^products/(.*)$ ...
0
votes
0answers
98 views

nginx url rewriting , file not found, codeigniter

I have this line in my config nginx file location / { try_files $uri $uri/ /index.php; } but this request always triggers a not found error: example.com/file.php how can I catch this ...
1
vote
1answer
9 views

IIS Rewrite using IIS Manager

Hi there I am attempted to do a proper IIS rewrite utilizing the IIS manager credentials my hosting provider has given me. I have no experience with this and the articles I have read online so far ...
0
votes
0answers
32 views

nginx redirect all URI requests with query strings/arguments to the equivalent without

I was reading around about removing query strings/arguments from all requests by way of redirection like $1?$argument to just $1. I tried what the documentation said in adding a ? to the end of the ...
0
votes
0answers
10 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
42 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
63 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
50 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
84 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
101 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
86 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 ...