The tag has no wiki summary.

learn more… | top users | synonyms

138
votes
5answers
17k views

Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted How 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 ...
10
votes
7answers
5k 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
2k 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 ...
6
votes
3answers
12k 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
2answers
4k 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 ...
3
votes
4answers
10k 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 ...
3
votes
1answer
59 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
753 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
4answers
1k 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 ...
3
votes
0answers
129 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
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
2answers
1k 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 ...
2
votes
1answer
1k views

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

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'. ...
2
votes
1answer
174 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 ...
2
votes
1answer
327 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
2answers
431 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
1k 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
107 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
2answers
2k 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
408 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
977 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
264 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
860 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
13 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
249 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
71 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
150 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
2answers
813 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). ...
1
vote
3answers
1k 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
73 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
5k 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 ...
1
vote
3answers
890 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 ...
1
vote
3answers
286 views

Urgent SSH Local Port Redirection

everyone. I have a shell account but the admin has restricted ssh access to the server. The server is listening on 0.0.0.0:22 but the firewall blocks any incoming attempts to this port. He says he is ...
1
vote
1answer
689 views

how to redirect http request to another internal machine based on URL

I have a windows 2008 server at home (on a vmware server) along with other virtual machines, I want to open port 80 in my firewall, but I want to redirect the request to the correct vm. for example if ...
1
vote
5answers
140 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 ...
1
vote
1answer
44 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 ...
1
vote
1answer
289 views

Use OpenVPN gateway only on selected destinations?

Is it possible to set up OpenVPN on the client so that the gateway is used only on chosen destinations? I have read this answer OpenVPN make redirect-gateway optional on making the use of the gateway ...
1
vote
2answers
1k views

I can access my site via ports 8443 and 8080 but not via 443 and 80 (Tomcat)

I am using Tomcat7 on Windows Server 2008 My Server.xml is set up as follows: <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="443" compression="on" ...
1
vote
2answers
822 views

When I type localhost in IE8 only I get redirected to our public website

The other day I posted this question http://stackoverflow.com/questions/7519360/urls-are-inconsistently-being-redirected-using-isapi-urlrewrite-3-0 I was doing some local development testing on my ...
1
vote
1answer
766 views

Powershell; pipe stdout to commandline

As an example, I would like the following commands to put a dir listing with all subdirectories to StdOut @' >> -R >> '@ > .\test >> dir `test` So, after the first four lines, ...
1
vote
1answer
2k views

Is it possible to write an htpasswd file that redirects certain users to certain directories?

Assuming that I have a domain, say, mydomain.com and three directories under it call them dir1, dir2 and dir3, then is it possible to put an htpasswd file at the web root and have it redirect ...
1
vote
2answers
1k views

Simplest way to redirect from a page on one domain's URL to another domain?

Background: I redirect my web site's email to a Google Apps account, since Google was giving me much higher uptime and much better spam filtering. But it's a pain to log in from a new PC. You have ...
1
vote
1answer
270 views

Nginx: Redirect all traffic to Coming Soon page except own IP

I have a folder called "coming-soon" that I would like to redirect all traffic to when the site is down for maintenance. Currently, this is what I did: ----- START ----- location / { allow ...
1
vote
2answers
334 views

HAPROXY per domain redirection

I'm trying to redirect requests to my load balancer by domain name with acl and hdr_dom, to a separate backend. The redirection works ok with the first request - 'GET /' (the destination server is a ...
1
vote
1answer
889 views

Windows cmd stderr redirection to stdout while keeping output to stderr?

Is there a way in Windows 7 cmd shell to redirect the stderr to stdout while keeping the stderr stream intact? For example, I have a program that outputs to stderr and stdout the following message ...
1
vote
3answers
192 views

Redirecting specific traffic to amazon AWS

My server has recieved sudden increase in the (read) web traffic, requesting many map image tiles, and apache cannot handle it. Apache cannot even handle the redirections! The average load I get in ...
1
vote
1answer
157 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 ...
1
vote
1answer
848 views

Squid Transparent Proxy with port 80 redirection: blank page for some sites

I have a squid transparent proxy that's working great. To save time on client configurations I've decided to redirect port 80 to 3128 so I can configure for all clients the new proxy just changing ...