The tag has no usage guidance.

learn more… | top users | synonyms

201
votes
5answers
61k views

Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About Mod_Rewrite Rules but Were Afraid to Ask

This is a Canonical Question about Apache's mod_rewrite. Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This ...
20
votes
7answers
9k views

create 'virtual file' from bash command output?

I wonder if there is a way to create a 'virtual file' from a bash output. Example: Let's say I want to email the output of mysqldump as an attachment to an external email address. I can use Mutt to ...
9
votes
3answers
3k views

How do I obscure my Wordpress install via htaccess?

(I am aware that security via obscurity is not recommended). I am trying to hide the fact that I am using Wordpress. This post is helpful, but it only addresses the content (sort of). I am interested ...
9
votes
2answers
7k views

How to redirect all mail from one domain to another in Postfix?

I have two forms of the same domain name, one being a common misspelling of the other, let's say tedswidgets.com and tedswigets.com. I'd like to redirect all mail for <someone>@tedswigets.com to ...
8
votes
1answer
17k views

How to quick and easy remove part of an URL in Nginx with HttpRewriteModule?

I know about the HttpRewriteModule, but I don't really know how to handle regex and I would need to redirect all URLs within a certain directory to another, specifically example.com/component/tag/...
7
votes
3answers
31k views

Find users that are auto forwarding / redirecting their email in Exchange 2010 using Powershell

We are using Live@edu, which is essentially hosted exchange server with some additional features and limitations to work around, and I'm trying to find everybody that is forwarding or redirecting ...
5
votes
4answers
17k views

Redirect subdomain.example.org to somethingelse.com hidden to the user?

I'm not knowledgeable at all about C-NAMES, A-RECORDS, name servers and the like, so just bear with me on this one: I want to redirect subdomain.example.org to another domain somethingelse.com. I do ...
5
votes
3answers
3k views

Prevent port change on redirect in nginx

I currently have nginx setup to serve content through Varnish. Nginx listens on port 8000 and varnish connects users' requests from 80 to 8000. The problem is, on some occasions, particularly when ...
5
votes
2answers
2k views

Access D-Bus remotely using socat

Description: I'd like to access a D-Bus system service from another machine, knowing only machine's IP address and the service to connect to. What I have recently found is Gabriel (D-Bus over SSH). ...
3
votes
2answers
6k views

.htaccess - redirect non www to www and retain subdomains from redirecting [duplicate]

So, on my main domain 'domain.com' I created several subdomains from cPanel, like 'sub1.domain.com' and 'sub2.domain.com'. Their real location on server is in 'domain.com/sub1' and 'domain.com/sub2'. ...
3
votes
1answer
1k views

Folder Redirection on Domain Controller Win Server 2008

This is a long post with a few questions in it. They are all related to the same issue though, and solving one or the other will probably solve the others. I did look on superuser for similar ...
3
votes
1answer
5k views

Difference between Roaming profiles, User Profile, Home Folder, and Redirected Folders?

On the network where I work, it appears at various times people have had roaming profiles, user profiles, redirected folders, and home folders. What are the purposes and differences between these? ...
3
votes
1answer
1k views

Forcing command on ssh's authorized_keys merges STDOUT and STDERR

I've been working to have a script in a centralized server to do some things and output a .tar.gz file (see redirect temporarily STDOUT to another file descriptor, but still to screen). I also have ...
3
votes
3answers
71 views

Redirect subfolder to another local IP in apache [closed]

I've got a raspberry pi working and being accessible through a domain, which is asada.net. It serves web pages using apache 2.2.22. Besides, I recently bought a NAS which has a web page in a local ...
3
votes
4answers
2k views

Providing DNS redirection to honeypot server for known bad domains

Currently running BIND on RHEL 5.4 and am looking for a more efficient manner of providing DNS redirection to a honeypot server for a large (30,000+) list of forbidden domains. Our current solution ...
2
votes
3answers
2k views

redirect temporarily STDOUT to another file descriptor, but still to screen

I'm making a script that executes some commands inside, and these commands show some output on STDOUT (and STDERR as well, but that's no problem). I need that my script generates a .tar.gz file to ...
2
votes
3answers
178 views

Redirect subdomain to subdomain Apache2

Let's say I have a web server with IP address: 1.2.3.4. I also have 2 subdomains: sth.city.eu inf.xyz.city.eu I'm using apache 2 on Ubuntu Server. Here's my /etc/apache2/sites-enabled/site ...
2
votes
1answer
721 views

Weird http -> https redirection although not configured

I am running Apache 2.2.15 (CentOS 6.6) with a HTTP-only domain demo.xml-director.info Using wget I can retrieve the content properly wget -S http://demo.xml-director.info --2015-01-05 13:31:41-- ...
2
votes
1answer
2k views

Issue when redirecting a folder using IIS url rewrite

Using Url Rewrite, I'm trying to redirect /foo_bar/* to /foo/*. I've tried this: <rule name="Redirect foo_bar to foo" stopProcessing="true"> <match url="(.*)" /> <conditions ...
2
votes
1answer
259 views

Redirect subdomain.xyz.com to subdomain.abc.com

Hey all, I'm trying to move to another domain, but have many subdomains under the existing domain. All the subdomains will be the same but just mapped with the new domain. [subdomain].xyz.com => [...
2
votes
2answers
1k views

How do I redirect multiple domains to a single domain in lighttpd

If I have the following domains in lighttpd: domain1.com domain1.co.uk domain2.com domain2.co.uk How do i redirect all these to to 'domain.com'? ie: domain1.co.uk/some-path/ redirects to domain....
2
votes
1answer
34 views

Redirect to language specific domain - Apache 2.4

I'm using Apache 2.4 to host those domains: domena.pl/ domena.pl/ru domena.pl/en I need to redirect domena.com to domena.pl/en. Here's my htacces file: RewriteCond %{HTTP_HOST} ^(www\.)?domena\.ru ...
2
votes
1answer
343 views

Can I redirect an HTML link on our webpage to another server?

We have a website that we host. In the sites header, we have links to sections of our site. eg. [Logo] [Buy] [Sell] [Pew Pew] and the current links are Logo: / (root of the site) Buy: /buy/ Sell: /...
2
votes
1answer
193 views

How do I persuade Nginx to redirect all requests except /robots.txt?

I'm using Nginx and pointing a couple of old domain names to a new site. The first block in this config works fine for how I need old.domain to behave when redirecting to new.domain. In the second ...
2
votes
1answer
368 views

lxc-attach command with redirection

I'm setting up for a Proxmox 4 server a script that migrates OpenVZ dumps from a Proxmox 3.4. The scripts scp the backups, restores them and so on. At a time of the process, I'd like to wipe /etc/...
2
votes
5answers
340 views

Amazon Linux: Can't log background task output?

We recently moved to AWS EC2 instances w/ the Amazon Linux distro. On our old servers (RH Enterprise), we've been able to run a command in the background (&) and also redirect the output to a log ...
2
votes
2answers
525 views

Redirect WWW to non-WWW without using a separate virtual server in Cherokee

I'm using Cherokee webserver and I wish to redirect all requests to www.domain.com to domain.com without creating a separate virtual server to redirect requests. In the Host Match section, I've set ...
2
votes
2answers
2k views

socat connect-connect “proxy” two inbound TCP connections to expose a firewalled service?

I'm struggling a bit trying to see how to use socat (or a similar TCP port redirector) to expose a firewalled service on a PC. Here's the scenario: I have a server PC which will be acting as a ...
2
votes
1answer
313 views

nginx - get parsed server_name

I have created virtual hosts for my websites and then i have created an other virtual host with server_name -> default_server in order to catch everything else and show a specific page in that case ...
2
votes
1answer
203 views

mirror STDOUT and STDERR to file by default

How I can accomplish STDOUT to be to logged in a file (appending), but preserving the flow (leave STDOUT to STDOUT) ? STDOUT should work transparently, but should be logged also into a file, without ...
2
votes
2answers
4k views

Redirecting to other internal servers based on sub domain

Here is my situation home network, windows machines, 1 external facing IP address (that allows port 80) 1 windows home server always on machine, planning on upgrading to WHS 2011 soon. several IP ...
2
votes
1answer
768 views

Failover/redundant SSH

I have an SSH server where multiple clients SSH in to maintain a bunch of port forwards. What I want to do is, if the server goes down, have the clients automatically connect to the next server. The ...
2
votes
1answer
1k views

Apache Redirect to Jboss SSL

I'm trying to have an SSL Connection to an Apache server on port 443 which I want to use to proxy connections to a JBoss server on a different port. The SSL certificates sit on the Jboss server not ...
2
votes
4answers
295 views

How to write to a file and, while the file is still being written, read and parse its contents using a shell script?

I'm actually trying to write a shell script that logs the output of a command to a file, but since the command takes a long time to complete (about 15 minutes), I would like to start parsing the ...
2
votes
1answer
1k views

Moving Group Policy Folder Redirection root path

I have all my users on my domain enabled for Folder Redirection and they all point to the same root path (Basic Redirection). Here are the settings. I want to move only a subset of those users out to ...
2
votes
6answers
891 views

Printer Redirection Tool

I have two machines (A & B), machine A has to be able print to a local printer. The issue is that the problem it can't have any printers connected to it (network or local) - so what I want to do ...
2
votes
0answers
1k views

FreeRDP USB Redirection Not Working on Hyper-V?

I have compiled FreeRDP from the tip of the Master branch on (and for), an ARM v7 processor, (see cmake command line below). It all seems to build correctly and the basic xfreerdp client works for a ...
2
votes
0answers
16 views

How are redirects to a special page explaining page moves a security Hole

I've been hearing at work that once we move our web platform, that unhanded redirects that could go to a spcial page telling the user where their requested page has moved to would present a security ...
2
votes
0answers
358 views

Nginx multiple server blocks

Im having an issue trying to configure Nginx to work with gitlab and some other sites I have. I have foo.com that points to my server. bar.foo.com also points to my server. I'm trying to have ...
2
votes
0answers
79 views

Flipping between databases

I have inherited a tomcat application running on RHEL that connects to a local postgres database. We have a total of 8 servers in multiple states running this. Each server actually has two different ...
2
votes
0answers
230 views

URL Rewrite in Apache + Tomcat set up with change in web application context

How to make URL http:/hostname:8080/abc?func=ll point to the URL http:/hostname:8080/xyz?func=ll automatically. Set up is Apache behind which Tomcat is present. Application "xyz" is deployed on ...
2
votes
3answers
694 views

How can one redirect to a new host all traffic destined for an old host?

We're moving a bunch of services, say from 1.2.3.4 to 5.6.7.8. In order to test that the new services are correctly configured, we'd like to redirect (to the new host) all traffic destined for the ...
1
vote
3answers
528 views

SH conditional redirection [closed]

I want to be able to redirect some output of my script to /dev/null based on a command line switch. I don't know how should I do it. In a silly way, it would be something like this (in a too ...
1
vote
1answer
55 views

Fix missing ssl-cert for subdomain www. using redirect or similar

We're using setup with an nginx on one machine and (currently) one application server on apache in the back. For multiple domains we got ssl certs, but only for the domain itself. So without ...
1
vote
1answer
1k views

Redirect DNS requests for 8.8.8.8 to a local DNS inside a LAN

I have a local network (10.0.0.0/24) with a gateway (I'll call it G, IP 10.0.0.1), a device (I'll call it N, IP 10.0.0.31) making DNS requests directly to 8.8.8.8 completely ignoring DHCP setting for ...
1
vote
3answers
2k views

Using port 80 for web server adds weird query string

When my web server is using port 80, a weird query string is appended to any page my visitors go to and breaks some of my services. I changed nginx to use port 81 and it works fine, without the ...
1
vote
3answers
2k views

Run FTP session from bash script

I'm trying to write a BASH script to test if an FTP site that I own is running. I therefore want the bash script to connect to the FTP site, log in with a dummy account and redirect the output to a ...
1
vote
1answer
89 views

Url Redirections using .htaccess

I would like to add 1500 url redirections using .htaccess on a apache server. Is it a bad idea ? will it decrease the performances significantly? Thanks
1
vote
1answer
1k views

Nginx - Redirect any Subdomain to File without Rewriting

Recently I have switched from Apache to Nginx to increase performance on a web server running Ubuntu 11.10. I have been having issues trying to figure out how certain things work in Nginx compared to ...
1
vote
3answers
1k views

Redirecting to alternative ports

I am trying a little bit of security by obscurity here and I want to do the following for a number of services (i.e. MySQL): Let the services definitely run on localhost on their default port Block ...