Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [redirection]

Can be either redirection internet traffic to different IP's or redirection of files from one path to another path.

7
votes
1answer
35k views

.htaccess 301 redirect with regular expressions

If I have: redirect 301 /users/foo http://www.example.com/profiles/foo redirect 301 /users/bar http://www.example.com/profiles/bar Can I do something like? redirect 301 ^\/users/(.+)$ http://www....
15
votes
3answers
5k views

Do browsers change URLs of saved bookmarks in response to 301 redirection?

HTTP status code 301 is used to indicate that content has moved permanently, and that the returned URL should be used to access the requested content in future. RFC 2616 says Clients with link ...
2
votes
1answer
122 views

How to construct shell redirection on command line

Consider the following command in Unix: echo 0123456789 | cat >/tmp/foo &> /tmp/bar The echo is sent to /tmp/bar. However, what I really want is to redirect the stdout and stderr output ...
10
votes
1answer
15k views

Redirect Domain Name to Localhost

I have a linux test machine which I would like to run a copy of a production webserver. This is a legacy application which does not use a property file for its server name. Throughout the application, ...
7
votes
1answer
17k views

Redirect input from one terminal to another

I have sshed into a linux box and I'm using dvtm and bash (although I have also tried this with Gnu screen and bash). I have two terminals, current /dev/pts/29 and /dev/pts/130. I want to redirect ...
2
votes
1answer
156 views

Yahoo toolbar and local sites (e.g. Intranet)

We have local sites running on IIS in regular MS Windows network. User base has IE, FireFox and Chrome. Local sites are isolated by host headers and DNS record created for the common IP accordingly. ...
7
votes
6answers
2k views

Is there a way to “redirect” a click on a URL in a VirtualBox guest to open in the host OS browser?

I'm using VirtualBox OSE on Ubuntu 10.04. I have a Windows 7 guest VM which I use almost exclusively for MS Outlook to access my Exchange mailbox. If I click a URL in Outlook it obviously opens in IE ...
40
votes
1answer
45k views

Is there an equivalent to /dev/null in Windows?

If I want to ignore stdout of a command, I do this on *nix: myprog > /dev/null How do I achieve the same on Windows (in cmd or a batch file)?
41
votes
5answers
106k views

Remotely run script on Unix, get output locally?

I need to run a (Tcl, or whatever) script on a remote Unix machine, from a (local) Windows command shell, and I want the stdout/stderr of the script to show up in the Windows CLI. The exit code would ...
5
votes
2answers
16k views

redirect output from dd command

How to redirect output from dd command to /dev/null ?
9
votes
3answers
20k views

How to ignore error messages in bash on Ubuntu?

I'm trying to show the number of lines, words and characters of all configuration files in /etc/*conf (with command wc). How can I modify the command (or commandline) to not view the error messages?
1
vote
1answer
2k views

getting error while doing cat command “Ambiguous output redirect.”

while executing cat test.txt | java myfile > test1.txt 2> test2.txt I am getting error "Ambiguous output redirect." my java file contains System.out and System.err . I am in Unix csh ...
1
vote
1answer
7k views

Apache redirect from one domain to another domain

Like many users, we tend to register the *.com and *.net versions of our domain names to prevent nefarious squatters. So if we wanted "foo.com" we'd also register "foo.net" and have them both resolve ...
4
votes
1answer
14k views

WIndows 7 - Virtual PC - Printer redirection

Where can I set the printer redirection in Windows 7 Virtual PC? I cannot find it and Windows XP Mode does not have the printers that are installed locally on Windows 7. I see everywhere on the ...
7
votes
4answers
562 views

Documenting Unix commands on the command line

I would like to append both the last command and the output of the last command to a text file for the purpose of a tutorial. For example: After I do an ls in my home directory I see this on the ...
12
votes
2answers
25k views

How to redirect output to a text file and the console (cmd) window at the same time?

How can I redirect output to a text file and the console (cmd) window at the same time?
6
votes
6answers
2k views

Want to use apache, ISP blocking port 80

I am attempting to set up a small web server on my home network, but my ISP is blocking incoming port 80 ( and no, i'm not paying $50/month extra for them to unblock it). I am looking for some ways ...
1
vote
3answers
2k views

IPv4 forward on windows?

Is there anything that can forward/redirect all incoming traffic to another ip. Basically I'm looking the windows equivalent of ip forwarding in linux. echo "1" > /proc/sys/net/ipv4/ip_foward
3
votes
1answer
5k views

How can I tell if an email has been sent directly, or redirected on the way?

I've been receiving email from a company, but they claim I'm not on any of their email lists and that it must be getting forwarded by one of their clients. How can I determine whether or not the ...
1
vote
2answers
3k views

How can I create a redirect for Apache 2.2 webserver on Windows-7

I'd like to have a redirection web page from one page to another so that I can have two names for the same web page on my server. I tried creating a windows shortcut, but that did not work. Please ...
3
votes
1answer
2k views

Redirect one domain to other using hosts file or similar

Usually, the syntax in the /etc/hosts file is IP hostname alias1 alias2 but I want to make something like SERVER SERVER2 but I don't want to specify the SERVER IP in the file, only the host name....
3
votes
4answers
4k views

Redirect browser to different host and port

Background, Running windows 7, FF3.5, and am an admin. I recieve emails from an internal company service that has links. The problem is the links don't work from my office. If the resource is http://...
2
votes
1answer
632 views

Firefox extension that detects or monitors a page for certain text and then redirects

I'm looking for a Firefox add-on that can detect or monitor a webpage for certain text or words and redirect to another predetermined page if found. So basically, when someone surfs the web, and they ...
0
votes
1answer
221 views

Redirecting a port to a remote server on windows

I only have command line access to a server and I'm not allowed to disable the antivirus (which blocks netcat). What I would like to do is have a program that listens on port A and when a remote ...
1
vote
2answers
2k views

Global hosts in /etc/hosts file?

I have a Mac OS X Snow Leopard Server as my network router. Is it possible to set a global host in its /etc/hosts file, like: 127.0.0.1 www.foo.bar that redirects all requests (e.g. browsing ...
58
votes
4answers
101k views

What does “2>&1” do in command line?

I know that the > sign is used for output redirection in the command line, but I'm having trouble finding something that explains the use of 2>&1 in the command line. For example: curl ...
2
votes
2answers
740 views

Question on the <> Linux Redirection Operator

I'm studying for my LPIC-1 and I'm confused by the <> redirection operator. I know the official definition for this is that it "causes the specified file to be used for both standard input and ...
4
votes
4answers
3k views

Stop Firefox from redirecting mistyped domains to ask.com

When I get a URL wrong at the top level (i.e. when DNS lookup returns NXDOMAIN), my Firefox browser redirects me to ask.com. How do I remove or customise this functionality? There's nothing obvious ...
2
votes
4answers
4k views

Ubuntu: Fake ip address

I have a software package which is hard-coded to open a connection to a certain local IP address. Unfortunately, the local network settings have changed, And I can't access the source code (long story)...
2
votes
1answer
490 views

Letting a folder on one disk redirect to a folder on a second disk. How?

I bought a powerful desktop system with two hard disks. Windows Vista came pre-installed on the D: disk. My secondary disk received the letter E:. Really annoying, but when I just had the system, it ...
0
votes
4answers
5k views

Redirecting web pages on Belkin Router

I am running a small wireless network for a school (all computers are Windows) and would like to stop those that are using the Wireless Internet from hitting possibly banned web pages (e.g. ...
2
votes
1answer
4k views

Displaying and storing Windows Batch file output

I've got a batch file written that runs a program we've developped, passing in a number of parameters. Whilst running the program in debug mode, a large number of debug messages are output, which it ...
49
votes
15answers
123k views

How to find out the real download URL on download sites that use redirects

Let's say I want to download something with wget but the website that has the files I need redirects to a site which automatically chooses a mirror for me (and there's no static file URL provided). ...
0
votes
2answers
140 views

Linux redirection question

What does the following do on Linux? cat <> FIFO | Where FIFO is a FIFO created in the current directory.
1
vote
2answers
2k views

SQuirrelSQL redirect ouput to a file?

Does anybody knows if SQuirrel SQL client may output the of several SQL commands to a single result window in textplain or to a file ( as SQL+ would ) So I can: select * from dual; select * from ...
2
votes
5answers
2k views

gmail redirects to original country even after updating it

When I signed up to Gmail I was in Algeria so I chose Algeria as the country, but now am not anymore there. I changed the setting on my profile but whenever I signing to my Gmail I takes like 15 ...
5
votes
1answer
195 views

Redirection: How did the extra word get in the file?

I was testing a script and wanted to create a small file with a bit of text in it so I typed the following and forgot to escape the space in the filename: echo "bob">other name When I did ls, it ...