redirect

how do i get python's mechanize to stop following meta refresh redirects?

I have a script which gets a webpage with a meta refresh. I need to parse the retrieved page but mechanize seems to follow the redirect. How do I get it to stop following it? ...

.htaccess rules being ignored?

I know I can do a redirect using a PHP header in a directory but I want to do it in a tidier fashion with the use of .htaccess. I've looked at all the answers and other examples but they seem to be ignored? I am using the .htaccess file placed in the root of the site directory. I want subdomain.domain.com/directorya to redirect to sub...

Running Python-script in thread and redirecting std.out/std.err to wx.TextCtrl in GUI.

I'm trying to write a GUI that reads in settings for a python-script, then generates the script and runs it. The script can take dozens of minutes to run so in order to not block the GUI and frustrate the user I'm running it in a separate thread. Before I did this I used a separate class to redirect the std.out and std.err of the program...

Apache Redirect path to subpath

i have original urls of type servedomain/index servedomain/category i just need to redirect all of these urls to servedomain/app/index, servedomain/app/category except css and images ...

How to use ASP.NET with "Redirect after POST" pattern? [Edited]

I'm trying to implement Redirect After Post for the first time in ASP.NET. Assuming my business objects may take several seconds to a minute to complete, in what order, and what syntax do I use? For example: User POST's Server issues Server.Transfer or Response.Redirect Server does something that takes a minute or two Thread.Sleep ...

Can you use a php header redirect on a rtmp url?

Curious, as I've been asked to do this. I can't find any sort of protocol anywhere. ...

htaccess infinite redirect

I'm working on a legacy codebase, with three different folders of images. An image could be in any one of the three folders, in a pretty much random manner. I initially attempted to check for file existence within PHP; however, images are being displayed in tons of places, and I'm hoping I can just achieve the same thing with an htacces...

ASP.NET/JavaScript - Script Registration/Redirection Problem

Hi Guys, My page has a submit button on it (server-side button). Here's my code for the click event: protected void SubmitButton_Click(object sender, EventArgs e) { db.SaveSomething(); Page.ClientScript.RegisterStartupScript("someScriptWhichReliesOnServerData"); Response.Redirect("SomeOtherPage.aspx"); } Now, the problem...

Ignoring if statement

I have a facebook login system that seems to work fine, but I want to redirect to the home page if the user is logged in. SO this is the top of my page <?php session_start(); if(!empty($_SESSION)){ header("Location: home.php"); } But that gets ignored and it runs the login script as if $_SESSION is empty, even tho I print the Sessio...

Zend_Test - Setting redirect in Controller Plugin for PHPUnit

Hi I have been trying to use PHPUnit to test an application. I have it all working, but cannot test redirects. My redirects are occurring inside an Acl Controller Plugin, not inside an Action in a Controller. I have changed them to use the suggested format of $r = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector'); $r...

Having trouble with a simple .htaccess redirect

I've been working on this for a while and have tried a lot of different solutions I've seen on the web and can't seem to get this to work. I have a site at www.mydomainname.com. The page that I want to handle ALL page requests is www.mydomain.com/index.php. I'd also like to set this up to work for any other domains that I point to this ...

Intended URL redirect + default redirect after login?

Hello, When a user tries to access our website via a link (for instance going to www.website.com/privatepage) they are redirected to a login page. Once they login, we want to redirect them to that intended URL - how do you do this? Also we have a use case where a user logs in from the homepage, or goes directly to the login page with ...

On login error, redirect to separate login page

I have a home page that is very design-specific, down to the pixel. It needs to have username/password/login, but I can't have it showing any error messages there. There is a separate standalone login page that is not design-specific and can show any messages. It's using the standard Login control. Is there an easy way to link the tw...

Android MediaPlayer Streaming from a PHP Redirect does not work-out!

Hi, The company I work for is developing an Android App that plays a video file from a URL on web. The video URL is a parameter for a PHP script that encode it properly and redirects to the encoded video as shown below: header('Content-Type: video/'.$format); header('Location:'.$output_video); Where $output_video is the URL to the en...

Is it possible to disable echoing query results to stdout in MySQL client?

I am using MySQL client interactively from a remote host. Is there anyway to mute the output of queries and save the output to a file instead? Using tee command in MySQL can save the output to a file but can't disable echoing. ...

Able to Echo before header()

Hi, Came across something strange while migrating to my new server. I have a script that will redirect users to another web page based on certain conditions. What I was doing, however, is echoing out 'Redirecting...', then using the header() function to actually redirect. Here is how the code looked: if( $condition ) { echo 'Red...

HTACCESS Redirects

In my htaccess file, I have the following two rules. I would like to make the second one occur on the condition that the first one doesn't match. Currently, they both get run. Is there any way around the collision? redirect 301 /lorem/ipsum-keyword.html /lorem/dolorem-keyword.html RewriteRule (.*)-keyword.html$ /dir/file.php?param=$1 ...

Passing on multiple GET variables with the "next" parameter in the URL

I'm having issues passing on multiple $_GET variables with "next". I'm redirecting users to the login page: [email protected]&activate_key=1421sdxzcxz213xz The problem is that the activation key is treated as a second $_GET parameter on the login page (along with "next"), instead of being part of the re...

When is a postback not a postback? (according to ASP.net)

Is there a difference between me using Javascript to redirect to URL + "?Querystring=value" versus using whatever mechanism ASP.NET uses? If there is a difference, how can I make the rendered ASP.NET page be submitted to the same URL with a different query string by javascript? ...

.htaccess redirect conflicts with another htaccess rule that I can not remove

The Information: So I am fairly new to .htaccess and have being reading a bit. Basically I want to do this, redirect the url www.example.com/center-pro to www.example.com/pro-hq (found how here here http://stackoverflow.com/questions/3374696/htaccess-url-redirect) However the site i am work on already has a .htaccess file in place. ...