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
1answer
21 views

nginx url redirection without file paths

I'm trying to set up nginx to let the name node of a Hadoop based cluster that I set up effectively redirect to the different user interfaces surrounding Hadoop based off of the file extension on the ...
0
votes
0answers
33 views

UPDATED: Why have I worked so much with URL rewriting when I can't accomplish a very small feat? [duplicate]

The originally intended title exceeds the limit; it is, "Why is a URL shortener rewriting http://cjsh.name to https://cjshayward.com when I want http://cjsh.name forwarded to https://cjshayward.com/...
0
votes
2answers
1k views

Correct rewrite syntax to remove index.php

I got an nginx vHost that hosts: a CMS in / a magento shop in /store Things are running fine except one thing: Removing index.php from the URL. At the moment the following URLs are working ...
24
votes
4answers
35k views

how to restrict access to directory and subdirs

I need to restrict access to any files or subdirs in direstory "testdir". My conf: ... location ~* ^.+\.(jpg|txt)$ { root /var/www/site; } location /testdir { deny all; ...
0
votes
0answers
10 views

Apache mod_rewrite proxy and plus (+) symbol encoded as %2B

I have a 3rd party application where I'm trying to access the path /a+b/file.txt. The URI for this must be http://server.example.com/a%2Bb/file.txt. If I use http://server.example.com/a+b/file.txt ...
1
vote
2answers
127 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 ...
1
vote
1answer
5k views

nginx rewrite rules for Joomla!

I've got nginx installed on Ubuntu from the repository (v0.7.65), and while with my default site configuration works wonders with WordPress pretty URLs and nginx-compatibility plugin (so far), it ...
-1
votes
0answers
14 views

Convert apache rewrite to nginx, (if file exist in cache directory serve it from there) [closed]

How to convert this rewrite rules to nginx: RewriteCond %{DOCUMENT_ROOT}/cached/%{HTTP_HOST}/index.html -f RewriteRule ^/*$ cached/%{HTTP_HOST}/index.html [L] RewriteCond %{DOCUMENT_ROOT}/cached-...
0
votes
0answers
24 views

Nginx clean url

I'm a beginner on Nginx and I'm having a hard time figuring out how to create clean URLs. Currently, I have URLs that looks like this: localhost/real-estate/search/residential/?t=private-homes ...
0
votes
0answers
17 views

Http to Https redirect breaks website when enabled

I have an Azure VM with IIS8 and the URL rewrite module installed. I have a single website configured, with both default http (80) and https (443) bindings (for all unassigned traffic). Both http and ...
1
vote
1answer
20 views

add trailing slash after removing .html extention

My website is non www ,it has wordpress in subdirectory and some static webpages in the root and other subdirectory i want to remove .html extention from the webpages in the root and the others ...
2
votes
1answer
3k views

How to exclude a sub-folder from HTaccess RewriteRule

I have WordPress installed in my root directory, for which a RewriteRule is in place. I need to password-protect a subfolder ("blue"), so I set the htaccess in that folder as such. Problem is that ...
-1
votes
1answer
35 views

Amazon EC2 - Forcing redirect of non-www http and https domains to “https://www” domain in httpd.conf [duplicate]

First and foremost, thank you for your time with my question. I am attempting to forward all traffic from http:// and https:// to "https://www.[domain].com/[etc]" I am currently able to ...
1
vote
3answers
1k views

nginx rewrite rules: Rewrite /test/ and /test to /test.php

How do I do this? This seems to work by default in apache, but not on nginx it appears?
-1
votes
0answers
9 views

Why is cjsh.name redirecting to cjshayward.com instead of cjshayward.com/books? [duplicate]

I want cjsh.name to: Redirect the homepage (cjsh.name) to cjshayward.com/books, For non-homepage access, serve as a basic URL shortener, and For most non-homepage access, if a redirect has not been ...
2
votes
1answer
1k views

nginx rewrite subdomain to file as a variable

How do you get the subdomain as a variable to add in a rewrite? hello.example.com should go to example.com/user.php?u=hello but still display as just hello.example.com I'm currently doing http://...
0
votes
1answer
1k views

URL rewrite in IIS 8.5 is not working I'm getting 404 instead

Hi I've configured a rewrite rule on my IIS but it seems like it never gets fired I've been working on this for several hours without any luck this is my rule: ...
0
votes
0answers
46 views

How can i make nginx basic auth to deny rewrite redirect?

We know nginx rewrite directive with redirect flag will send 302 to client with a new location. I add basic auth in nginx config to protect all resource. server { listen 801; server_name ...
0
votes
0answers
21 views

Ngnix Rewrite Setup Along with Reverse Proxy (have some upstreamed servers)

I need to setup one URL rewrite rule in nginx, also I am having the same nginx server have 8 to 10 unstreamed servers (reverse proxy), which is running on 8080 port. I want to setup that rewrite rule ...
0
votes
1answer
16 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 ...
3
votes
1answer
1k views

IIS URL Rewrite - Redirect any HTTPS traffic to sub-domain

Our hosting environment dictates all secure traffic music travel over a particular sub-domain. We are using the .NET CMS Umbraco, which as far as I'm aware doesn't have any functionality to 'assign' ...
0
votes
1answer
1k views

Nginx rewrite rule - appending language prefix

I have a site spanish.com. I want users to load pages under "es" directory, i.e., spanish.com/es. For example: Users should see: spanish.com but spanish.com/es is loaded Users see spanish.com/...
4
votes
3answers
3k views

Redirect http://mydomain.com:12345 to https://mydomain.com:12345 in nginx

I know this must have been answered already, but I have been searching for quite a while, and cannot find the answer. Just not looking in the right place I guess, maybe someone can help me out. ...
1
vote
3answers
2k views

How to configure apache as a reverse proxy with the remote server specified in a query string parameter

Problem: I'm trying to configure apache as a reverse proxy where the remove server is specified in a query string parameter. Let's say I'm serving a site at mywebapp.com. If you navigated to http:/...
0
votes
2answers
1k views

Redirect page/subfolder to new domain url without changing url in browser

I have been looking for an answer this without any luck (searched everywhere) Basically, I want to rewrite a page (subfolder) to a new domain without changing the url. I've tried with no luck: ...
0
votes
1answer
3k views

.htaccess Rewriting Tomcat Server

I am writing a website using Railo. My code is to be deployed on a Railo Server running on Tomcat, overlayed on a regular Apache+PHP server. I need to send all requests to http://subdomain.myserver....
0
votes
4answers
10k views

How to redirect or rewrite IIS site with port in URL to URL without port?

I'm not 100% sure if this is the right part of StackOverflow to post this but to me it made the most sense. Sorry if its not! Currently I have a site in IIS configured on HTTPS with port 7500. I can ...
0
votes
0answers
9 views

Combine incoming map rule with reverse proxy

Is it possible to configure IIS to BOTH reverse proxy to an external site AND re-write part of the url? For example, I want to redirect: www.site1.com to www.site2.com I also want to rewrite www....
10
votes
4answers
7k views

Configure IIS 7 Reverse Proxy to connect to TeamCity Tomcat

We have an IIS 7 webserver configured and would like to create a reverse proxy for a TeamCity installation using Tomcat on the same machine. The IIS server site is https://somesite and I would like ...
0
votes
1answer
4k views

Nginx URL virtual host rewrite issues with Magento e-commerce. Help please

I've been running into some serious problems with my URL rewrites and I can't seem to fix it on my own strength and knowledge and troubleshooting on the web! Basically what happens is that when I ...
3
votes
3answers
5k views

How to redirect root to subdirectory while maintaining URL in the address bar

I have an nginx setup with folder structure like this: - www |- splash |- blog www is the root folder. I would like to redirect users who access http://example.com to the splash folder. But I ...
1
vote
1answer
88 views

add a URL suffix path (for mobile AMP) without causing a redirect loop in nginx

i am using nginx web server for my wordpress website. i am going to make it to become amp version for mobile serve. i wanna add /amp/ to my url. i also using pretty permalink for my current url,so ...
1
vote
2answers
45 views

nginx sub directory wildcard rewrite

I have set up a server block on my nginx server, e.g. with domain testsite.com. I want to be able to install separate WordPress installations into direct child folders of the root folders, e.g. /var/...
-1
votes
0answers
11 views

IIS rewrite to another domain in the same server

Which is the format for rewriting a url from one site (domain A) to another site (domain B), both sites (and domains) hosted in the same IIS server, with a rewrite (not redirect) rule? Thanks
0
votes
1answer
2k views

IIS 7.5 URL Rewrite and 404 Not Found

I'm trying to setup a reverse proxy using IIS to proxy request on port 80 to a local virtual machine on port 8080. The rewriting rule was setup using IIS GUI "Reverse Proxy" rule. However it work very ...
0
votes
1answer
18 views

Nginx Subdomain Rewrites to Server Directory

We're making a move over to some Nginx servers from Apache. While we've used Nginx for various sites its been in a mostly basic config. However, one of the 'sites' (multiple actually) we host is a ...
0
votes
2answers
9k views

nginx rewrite rule to convert URL segments to query string parameters

I'm setting up an nginx server for the first time, and having some trouble getting the rewrite rules right for nginx. The Apache rules we used were: See if it's a real file or directory, if so, ...
0
votes
1answer
39 views

Load balancing 2x IIS Webservers, across subnets

Morning chaps, Currently we've got one virtual webserver, and if it goes down, nobody can login or access our Intranet. To resolve this I've installed two test servers (2012 R2), one on our first ...
0
votes
0answers
9 views

Static file serving through apache2 [duplicate]

I want to enable static file serving using apache2 by accessing the files in files system. My application is running on Tomcat7, my virtualhost looks like: <VirtualHost *:80> #set server ...
1
vote
1answer
2k views

Nginx how to run shell script on page load via lua module os execute and then serve directory listing?

So I have a bash script that I want to execute/run on each "page load" of url so that it will modify (creating symlinks) to a /public/html/ folder that I want the server to then serve. The problem ...
0
votes
0answers
19 views

Messy conflict between Wordpress .htaccess and HTTPS rewriting

I'm using Apache 2.4.6. I am trying to do HTTPS for a specific wordpress site through apache configuration. I have the following in my apache vhosts: <VirtualHost *:80> # ... ...
0
votes
0answers
15 views

3 apache config files after SSL cert install. Rewrite won't work

I used EFF Certbot to install a free SSL certificate. Now I have three config files for my website. 000-default.conf 000-default-le-ssl.conf default-ssl.conf Additionally I have some other config ...
0
votes
2answers
11k views

Removing php extension with .htaccess does not work

I use the following code on my site elixnews.com to remove php extension from: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
0answers
76 views

Cross Domain Issue with URL Rewrite

We have the following URL rewrite rule in our IIS Web App: <rewrite> <rules> <rule name="Delegate report generation" enabled="true" stopProcessing="true"> <...
0
votes
0answers
17 views

IIS URL rewrite Subdomain path

I want to rewrite URL in IIS for the following condition. m.website.com/dress/page_1.asp rewrite to m.website.com/dress/page1 where m. subdomain goes to /mobile folder of the www.website.com.
0
votes
2answers
3k views

Apache rewrite rule and keep the url unchanged?

I have this rewrite rule RewriteRule ^ar$ /index2.html but i need to keep the url in the address bar unchanged after the redirect. ie. if the user typed http://mydomain.com/ar i need to ...
0
votes
0answers
35 views

NGINX rewrite dynamic url

I configure NGINX proxy cache for Atlassian Confluence And i faced a problem of caching the edited pages Some time after editing the pages do not show the changes(cache TTL) I decided to force the ...
1
vote
1answer
58 views

Nginx is not passing the request on to PHP

This is related to an old question I asked on SO years ago, for which I never got a proper answer. I'm just setting up a new server (Ubuntu 16.04, Nginx 1.10, PHP 7) and coming back to this. I have a ...
0
votes
1answer
37 views

nginx Rewrite for CImage Cache

I'm setting up a script (http://dbwebb.se/opensource/cimage) to do some image processing and I'd like to cache the resulting image output. I have that part working fine. The problem I'm running into ...
1
vote
1answer
46 views

Squid3 URLrewrite - Unable to configure

I have Squid3-3.4.8 on Debian Wheezy. It is performing caching duty. I just want to replace one jpg url to another URL in my local server or outside. I have tried solutions like Volta, squidred, ...