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
22 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
5 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
14 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
9 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
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 ...
0
votes
0answers
62 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
14 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.
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?
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 ...
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
28 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 ...
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: ...
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
0answers
57 views

Nginx add path to url

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
1answer
48 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
33 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
31 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, ...
1
vote
0answers
12 views

Apache mod_rewrite Take @2x out of image request uri

For an acute server crash problem, I'm trying to match any request for @2x retina style images, and rewrite it to the non-@2x equivalent. First I want to check this is such a request: # NOTES: ...
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:/...
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/...
0
votes
4answers
9k 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
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 ...
5
votes
2answers
4k views

nginx $uri is url decoded

I am using nginx as reverse proxy and I have 2 rules like: location ~ ^/indirect { rewrite ^/indirect(.*) /foobar$1; } location ~ ^/foobar { set $url http://example.com/something/index.php?var1=...
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 ...
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
1answer
31 views

Nginx Url Beautify with Rewrite

Currently i have my own domain example like abc.com, but when i click another page in abc.com i saw that the url have too much thing then i expected, code like below abc.com/index.html?utm_expid=...
-1
votes
1answer
36 views

How does nginx rewrite break flag work?

I'm trying to set up a "coming soon" temporary page on a website: rewrite ^/(css|img|js)/ - break; rewrite ^/$ /comingsoon.html last; rewrite ^ /? ...
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
0answers
9 views

I want to rewrite the path with with htaccess [duplicate]

When I visit this link: http://user.demo.net/email@homepage.com/ It will be interpreted as follows: http://user.demo.net/data/email@homepage.com/ I tried this code but it appears the 505 error ...
0
votes
2answers
58 views

Subdomain redirection, URL Masking

My issue is simple but I can't seem to find the solution. I have a domain www.domain.com that has subdomains. www.domain.com 's document root is /home/domain/public_html Subdomains (excluding www) ...
0
votes
2answers
73 views

nginx check if filename with different extension exists

If a file with ".html" extension doesn't exist I need to know if the same file exists with ".th.html" extension and make a redirect. Right now on 404 I'm doing a rewrite and if $request_filename ...
0
votes
1answer
25 views

Masking URL, Subdomain redirection

We have hosted a Java web application for www.domain.com on Apache & Tomcat. I have two problems, as follows 1) Directory Index in Apache lists home.jsp ahead of redirect.jsp. For my domain.com ...
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
18 views

ASP Redirect Base URL Being Rewritten by IIS

I am attempting to debug, what I think is, an IIS rewrite issue. I am hosting multiple sites on a single IIS server which is acting as a proxy to Kestrel hosts behind the scenes. That is all working ...
-2
votes
1answer
33 views

Best way to remove file extension from URL

I want an URL without file extension to resolve to a file. There seem to be several options:   1 mod_rewrite Name the file "file.html" and rewrite the URL. 2 mod_negotiation Name the file "...
0
votes
1answer
39 views

URL Rewrite to different port on IIS 7.5

I have an IIS server with diferents sites running on diferents ports, for example: site1 runs on port 8025, site2 on 8026, site3 on port 8027. I want to configure URL rewrite so the user only have to ...
0
votes
1answer
20 views

Change subdomain url to subdirectory without redirection

I found a few questions and answers close to what I am trying to solve, but not quite. I see references to using mod_rewrite to change url paths without redirection. But, what I am looking for is, ...
1
vote
0answers
43 views

Nginx trailing slash redirect issue

I am running a Wordpress website with Nginx + Varnish. I am getting The page isn't redirecting properly error if I am adding or removing trailing slash in the configuration file. Please suggest the ...
2
votes
3answers
1k views

Server remembering old rewrite rules, even when I remove htaccess

I have set up a development server with Ubuntu and LAMP, but for some reason the .htaccess is acting strange... There is a site on there with a set of rules, when I comment them out they still work, ...
0
votes
1answer
99 views

Nginx rewrite certain port to subpath (nginx + uwsgi + django)

My goal is to rewrite everything under http://localhost:8000 to http://localhost/foo I followed every step mentioned in this link, but still couldn't get it work. Here's my settings: urls.py (...
0
votes
0answers
6 views

How to redirect all specific character strings? [duplicate]

I want to redirect all character strings to the index page using the RewriteCond Directive. A few examples to illustrate my intention www.example.com/character-string/ should redirect to www....
0
votes
1answer
22 views

Using RewriteRule to match RewriteMap value and ignore any trailing slash and characters?

I'm trying to use RewriteMap in a apache 2.4 virtualhost .conf file to redirect a number of URLs. A variety of requests can refer to a single entry in the map and I'm having trouble matching these ...
0
votes
1answer
19 views

Server 2012 URL Rewrite Module 2 always has 404

URL rewrite was working perfectly on Windows Server 2008, but I'm getting 404 errors when using the same configuration on Server 2012 <rewrite> <outboundRules> <...
0
votes
1answer
28 views

apache2 rewrite rule: delete any path from URL

I'm going crazy with a Rewrite Rule on Apache. Basically what I want to achieve is to rewrite any url like: http[s]://www.example.com/something to https://www.example.com I have a VHost on ...
0
votes
1answer
33 views

reorder url parameters (GET) with nginx or apache

Is that possible to reorder the GET parameters from a request (alphabetical) before it hits my application ?
1
vote
1answer
34 views

Nginx rewrite - remove substring at the end of URL

I have a faulty plugin that is generating URLs with /mobile at the end. I am trying to fix the plugin but in the meantime I would like to write a Nginx rewrite rule to redirect as shown below: http://...
0
votes
1answer
80 views

Apache rewrite rule to redirect a URL with parameters to a URL without parameters [duplicate]

I want to go from: www.website.com/directory/results?category=10&dir=asc to www.website.com/staticfile.html I tried the following and it doesn't seem to catch: RewriteRule "^directory\/...