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
1k 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 ...
3
votes
4answers
7k views

How to redirect non-www to www without hardcoding using .htaccess?

RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] ...causes a perfect, non-hardcoding 301 redirect from "www to non-www", ...
1
vote
2answers
17 views

Trying to rewrite /directory/dir_variable/ to /directory/dir_variable/index.php

I'm trying to rewrite something like this: domain.tld/staging/base_1/ to domain.tld/staging/base_1/index.php where '1' is a variable number. but am getting a redirect cycle. *1 rewrite or ...
0
votes
2answers
894 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
-1
votes
0answers
28 views

How do I rewrite old dynamic urls to new dynamic urls in nginx [closed]

How is it possible to rewrite following dynamic urls? http://www.example.org/12345-some-title.html to http://www.example.org/index.php?thread/12345-some-title/ Other urls can be ...
0
votes
2answers
124 views

nginx Subdirectory Rewrites for MVC

I am tasked with administering a web application that has a base directory with a bunch of legacy code in it, and a subdirectory of my own making with an MVC based API which we are using to slowly ...
0
votes
0answers
29 views

Apache URL Rewrite On the same Virtual Host works in one case but fails in another

I have an odd problem, where I am rewriting a URL to proxy to two different URL destinations, based on digits that are passed in the URL and a particular string, in the same virtualhost definition, ...
0
votes
0answers
15 views

Squid: bypass url_rewrite_program when request is https

I have a url rewriter working in squid currently. The problem is that, while it works fine for HTTP, HTTPS requests obviously don't work, even when rewritten with the same URL (because my server would ...
3
votes
2answers
10k views

How to enable the rewrite feature in nginx 1.0.5?

I recently installed nginx 1.0.5 with php fpm, php apc and postgres. I just want to play around with nginx and learn how to configure the basic stuff. For extended testing I decided to install PHPBB3 ...
0
votes
1answer
45 views

nginx: regex not working on url rewrite

I have http://sample.cervo02.com. i'm trying to get https://cervo02.com/sample. I tried couple of redirect none of them are working. rewrite ^([^.]*)$ https://cervo02.com/$1 last; return ...
1
vote
1answer
16 views

Postfix deliver mail for orginal destination + BCC - but only for one email

I have postfix with virtual users, I'm looking for solution, tried google it, but no luck. I want to achieve this one: mail for admin@* should be delvered to admin@* and BCC for webmaster@* I ...
0
votes
2answers
1k views

IIS ARR/Reverse Proxy 502 Errors for Larger Files

I have an API written in Python which I am accessing with IIS 7.5 via the ISAPI extension PyISAPIe. I thought it would be sensible to separate this API from our main site, so it is in a different site ...
0
votes
1answer
67 views

Postfix reply to emails addressed to external email while keeping the correct from address

I have a mail server all set up and running on ubuntu 14.04 with Postfix / Dovecot for the domain "postfixserver.com". A second domain "googleapps.com" is running on google apps. user@googleapps.com ...
0
votes
2answers
5k 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, ...
2
votes
3answers
2k views

lighttpd config and rewriting/disabling attempts to access favicon.ico

I've got lighttpd and apache working together on an app I'm building. lighty is serving out static content. However, each time a static asset is requested, I see a not found: favicon.ico message in ...
0
votes
1answer
19 views

How To …IIS, Reverse Proxy, URL Masking, Outbound .?

Here is the background On our website there is a a search function which communicates with Google Search Appliance (GSA). When the user lick on search it sends the request to ...
0
votes
4answers
4k 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
47 views

web.config URL access and rewrite

I'm trying to clean up some URLs to a bunch of PDF files. Right now, you access a PDF by visiting the following: http://www.mywebsite.com/sites/default/files/reports/2010_Audit_Summary_Report.pdf ...
0
votes
1answer
974 views

Apache mod_rewrite to return a 404 except one directory

I'm trying to configure Apache to return a default 404 page when the / of DocumentRoot is called, except for some directories in that DocumentRoot Unfortunately, I'm getting a 404 even for the ...
4
votes
3answers
4k views

multiple sub_filter rules for a reverse proxy on nginx?

with no evil plans I am trying to mirror a site under other domain, while changing a few strings on the fly. I set up nginx on a new host to serve as a RP to the master site. This allows to set one ...
1
vote
3answers
2k views

nginx: 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://mysite.com to the splash folder. But I don't ...
1
vote
1answer
67 views

Set Access-Control-Allow-Origin Header for specific URL that has a Query String

I'm asking this here as a last resort after trying different things / asking google / reading http://httpd.apache.org/docs/2.2/ I have the following in my apache2.conf # Allow cross domain fonts ...
0
votes
1answer
1k 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 ...
2
votes
1answer
114 views

nginx location and root settings dont work

I am trying to rewrite every file after cdn.minora.me/forum/ to another directory: server { listen 443 ssl; listen [::]:443 ssl; ssl on; ssl_certificate ...
0
votes
1answer
54 views

nginx location regex /yyyy/mm/dd/

I'm trying to pass requests from address example.com/donor/2014/12/07/Name on the other server. URIs are like /donor/2014/12/07/Mike and I need to convert them to a query type of: ...
1
vote
1answer
907 views

URL Rewrite and mod_jk

I want to redefine the base URL of a Tomcat webservice, mounted with JkMount. I tried the following: JkMount /myapp/* ajp13_worker RewriteRule ^/service/v1/(.*)$ /myapp/$1 [PT,QSA] The original ...
0
votes
1answer
1k 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 ...
0
votes
0answers
23 views

ARR and URL rewrite for node express website for iis server

I have an express.js website running on my localhost in my Webserver (IIS8.5). When I use ARR and url rewrite to point to localhost port 3000 where my express website is, I can access part of it from ...
0
votes
0answers
23 views

Nginx rewrites & passing PHP request to Apache efficiently

I'm in the process of moving my rewrites off Apache and including them in Nginx instead. The code below appears to be working fine, but is this the most efficient way of doing it? Also, what if I ...
0
votes
1answer
162 views

Rewrite/configure WebSVN location with MultiViews

I have configured mod_dav_svn 1.8.9 on FreeBSD along with WebSVN 2.3.3 this way: <Location /repos/svn> DAV svn SVNParentPath /usr/local/svn/repos SVNListParentPath On ...
1
vote
1answer
631 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' ...
3
votes
1answer
849 views

How to exclude IP from htaccess domain redirect [duplicate]

I'm trying to write a custom redirect rule for some testing purposes on 2 domains with exactly same site. The code I am using is: RewriteEngine on RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4$ ...
0
votes
0answers
13 views

server farm configuration for redirect and reroute [duplicate]

I have a windows server 2012 at home and I want to redirect specific requests to different machines in my network. How can I configure, for example, all requests for www.sample01.com to go to ...
0
votes
2answers
18 views

Nginx rewrite rule for CDN

I am struggling with converting an Apache rewrite rule to Nginx. The rule lives inside WEBROOT/cdn/.htacces and reads: RewriteRule ^[0-9]{1,6}/(.*)$ ../$1 [PT] The goal of it is to take a URL like: ...
1
vote
1answer
1k views

IIS URL Rewrite rule to redirect subdirectory traffic to https

I have a site where I've written an URL rewrite rule to direct all site.com traffic to www.site.com. Works fine. Now I want to add SSL to an application on a subdirectory. I've added the SSL to the ...
0
votes
1answer
13 views

Rewrite rule for custom parameter

I need to write a rewrite rule that will do the following: When user enters mysite.com/whatever, this address will stay in the browser but in the background following address will be called: ...
0
votes
1answer
21 views

Nginx rewrite *.domain.tld/page to domain.tld/page

I can not set up a redirect from *.domain.tld/personal to domain.tld/personal server { server_name domain.tld www.domain.tld *.domain.tld; listen 100.10.10.1; set $root_path ...
1
vote
0answers
63 views

Is websocket reverse proxy possible with IIS 8.5 & URL rewrite 2.0?

I installed Tomcat as a java app server behind IIS. Using the following rules I can rewrite static pages just fine, but alas, websocket connections are never established: <?xml version="1.0" ...
0
votes
1answer
985 views

Rewrite all requests to index.php except certain subdirectory requests

I want to rewrite all requests to /index.php, except /css/* and /js/*. This is my original config location / { try_files $uri /index.php$is_args$args; } which works, but lets me access all ...
-1
votes
1answer
24 views

How to make a RewriteRule on Apache .htaccess to fix a broken image? [duplicate]

My page has: <img src="/?cp_contactformtoemail_captcha=captcha&a=1&b=2&c=image.jpg" id="captchaimg_1" alt="security code" border="0"> But it should be: <img ...
2
votes
8answers
10k views

Excluding a directory from a root .htaccess rewrite rule to allow it to be password protected?

I have spent a tremendous amount of time the last week trying to figure this out, but no matter what I try I cannot get this to work. My web host said they did not have anyone who knew enough about ...
0
votes
0answers
16 views

Rewrite URL to so subfolder points to root in IIS

I have a website which when publish has a URL like: sub.website(dotcom)/sub/Default.aspx Is it possible to change it see when the user navigates to sub.website(dotcom)/ it loads the ...
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
0answers
36 views

How to debug opencart redirect loop?

I'm attempting to redirect an opencart website from http://domain.com to https://domain.com, i have tried the following with different variations: RewriteCond %{SERVER_PORT} !^443$ or RewriteCond ...
-1
votes
2answers
386 views

URL Shortener & Site Redirection on same domain

i have one domain(http://sdm.fm), And I would like it to work as a redirect to http://somdomato.com. But at the same time I would like it to work as a URL shortener. Using phURL. Like: ...
2
votes
0answers
34 views

Apache rewrite works under FreeBSD, not under CentOS

I have 5 production servers which are running FreeBSD 9.2, but we are planning on transitioning to CentOS. Because of this, I am attempting to set up some virtual machines to emulate our production ...
0
votes
1answer
2k views

IIS 7 Url Rewrite Not Working

Inbound IIS7 Url Rewrite Rule not working Below is the URL Rewrite rule I've defined. <rewrite> <rules> <rule name="Redirect domain.co.uk to www.domain.co.uk" ...
0
votes
0answers
40 views

Nginx redirect or rewrite with folder

I have a virtual machine with an apache which serves a web application at https://my.ip.address/web/index.hml (internal). At the router/firewall is a nginx running which works as an reverse proxy with ...
0
votes
0answers
48 views

Exceptions in redirection in URL in IIS Rewrite module are ignored

I have a new site https://www.NewSite.com and I would like all the traffic to my old site https://www.OldSite.com to be redirected to the root of my new site https://www.NewSite.com/, with some ...
0
votes
0answers
21 views

IIS Setup Redirect traffic from webserver to app server

I have done quite a few setup which involved hosting applications in IIS and configuring them accordingly, but now I have a different situation ... I have 2 web servers which don't host any ...