redirect

Grab console output launched with elevated privileges

I'm writing a command-line tool which requires privileges elevating. This can be successfully implemented using manifest. But if this tools is launched from cmd.exe or Far Manager (far.exe), a new console window is created. So all tool console output is written to it and is lost on close. So my idea is about implementing a fork, where ...

How to redirect a page url?

Hi, My problem is a little bit hard but simple. I have (or there is) a web page (http://sub.domain.com/page.php). An application graps data from this page. My aim is to change this page, not change it but let the system grap the data from c:\page.php. How to do the redirection? Thanks ...

Securely upload file to alternate server C# .net 2.0

I have a C# web application on .net 2.0 being hosted on server A. The web application allows users to upload files using <input id="File1" name="filMyFile" type="file" runat="server" /> to server A. This all works just fine. I am now being asked to modify the web application to allow pages being served by A to allow uploading directly...

Getting the failed url in a custom 404 error page

Is it possible to get the URL of the failed request from a custom 404 error page? I'm using IIS to set the custom error page to a .net page where I want to process the failed request. I've tried using the url and referer attributes from the request object but they don't work. ...

How to execute a function immediately after authentication

My question is this: With a web application, after performing a login authentication for a protected resource, how can I run some sort of function (in this case, I want to run a function to initialize some user-dependent session-scope variables) BEFORE the web-app redirects to the protected resource. I am programming a web application ...

Mobile Redirect

I have a webpage and I was recently asked to create the mobile version for it, now that I've done it I was asked to make an automatic redirection so that if the user goes into the webpage through a PDA/iPhone/Smartphone/etc he/she gets automatically directed to the m.website.com but I have no idea how to do this =/ I've tried some php's ...

How to redirect to login page from a web service in an AJAX call?

I am using jQuery to call web service (*.asmx) methods. The web service uses FormsAuthentication to determine whether the calling user is authenticated. I am unable to return a redirect status code from the web method, e.g. [WebMethod(EnableSession=true)] public Dictionary<string, object> GetArchivedFiles(int pageSize, int page) { i...

ASP.NET - redirect 301

How do I redirect permanently in ASP DOT NET? I'd like to do a 301 redirect from one page on my site to another page. ...

htaccess redirect problem

I'm trying to get my .htaccess to redirect all requests to the /blogs directory, except for requests that start with /staff. This is what I have so far: RewriteEngine On RewriteRule ^staff(.*)$ staff/$1 [L] RewriteRule ^(.*)$ blogs/$1 [L] It works fine for every case, except when I do http://mydomain.com/staff or http://mydomain.com/...

How to auto-add subdomain www when omitted by user (ASP.NET)?

Ok due to some client security something or other the DB tracking only works when there is a www in front of the subdomain. I want to prevent further support tickets from users going to thewebsite.com and finding out later the DB was not recording for them. I need it to redirect to www.thewebsite.com if they hit thewebsite.com. PS: I he...

Redirect stderr and stdout in a bash script

I want to redirect both stdout and stderr of a process to a single file. How do I do that in bash? ...

IIS 6 301 redirect problem

I'm having a problem with an IIS6 301 redirect. I've set up the following redirect for the domain domain.com to go to www.domain.com$S$Q (under Home Direcotry in Site Properties). If I navigate to domain.com I get redirected to www.domain.com with no problems. But if I go to domain.com/dir I get redirected to www.domain.com/dir/dir ...

How to redirect from HTTPS to HTTP without annoying error messages

I want to redirect users, after HTTPS login, to the HTTP pages on the site. Using HTTPS for the whole site is not going to happen. What I have so far is the following: User posts the login form to the secure site The secure server validates the credentials The secure server sends a 302 redirect to the client This works, except on ...

Better to Javascript redirect OR form submit?

I'm doing a select box navigator and wondering if it's better to do a javascript redirect or submit a form and redirect from there. Pros and cons of each? ...

Redirecting standard output to syslog

Hi! I'm planning to package OpenTibia Server for Debian. One of the things I want to do is add startup via /etc/init.d and daemonization of the otserv process. Thing is, we should probably redirect output to syslog. This is usually done via the syslog() function. Currently, the code is swarmed with: std::cout << "Stuff to printout" <<...

Redirecting output to multiple files and to stdout simultaneously in win XP command line

I would like to redirect the output from a command to a file and to stdout. I am using Windows XP command line. I realize that there is a command in linux called tee which will do this, but I want this in windows. ...

How do can you make redirect_to use a different HTTP request?

At the end of one of my controller actions I need to redirect to a page that only accepts put requests. I have been trying to figure out how to get redirect_to to use a put request but to no success. Is this possible? Or is there another way to accomplish this? Thanks. ...

How do I use .htaccess to force www. while using Zend Framework

I want to force a www. prefix on my website by using a .htaccess 301 redirect. I am currently trying: RewriteCond %{HTTP_HOST} ^mysite.com [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301] Which normally works, but I am using Zend Framework which causes all requests to be redirected back to http://www.mysite.com/index.php reg...

Setting response status code manually

I have a try catch block to handle an error I am getting with my application. I would like a simple way of setting the response to status code 403 or forbidden and then either redirect the user to the login page or to a custom error page. I am having some issue with once setting the status code and the redirect. Anyone have an examp...

linux: redirect stdout after the process started

I have a process that already started, with stdout to the console. can I redirect it to a file, without restarting it? ...