redirect

Is there an issue redirecting my homepage based on IP to a subdomain?

I have a website with .com domain. www.example.com. At the moment it's primarily focussed on the UK. However I've been trying to work out how to cope with expanding to the US/EU without having to migrate the existing site to .co.uk and put the US site on .com. my current idea is to have uk.example.com us.example.com example.frexample.de...

Remove all query strings from requests for particular page.

I have a flex application that for some reason I do not know why, when you are using google chrome and access the page with any query strings in the URL the applications behaves unexpectedly. The page does not need query strings though. But many things like adwords etc are passing variables in query strings for tracking purposes. But f...

Use htaccess to redirect all traffic from root to specific subdomain page

I have a site that has been up for some time. I had a blog on a subdomain for some time. I have decided to do away with the main site and just support the blog subdomain. I have a redirect setup for this, but it carries all the extra parameters through to the blog which results in a file not found page appearing. I just want the redi...

Any resource/codes on how fiddler works?

I need to track http/url requests & redirects from a windows forms application using C#. It should handle both IE & firefox. Not sure if Fiddler is open-source but if i'm not mistaken, it's written using .NET. Sample codes or online articles on how to listen to http/url requests & redirects will be appreciated. Thanks! ...

How can I redirect STDERR to STDOUT, but ignore the original STDOUT?

I have a program whose STDERR output I want to inspect and run grep on etc. So I could redirect it to STDOUT and use grep, but the problem is, I do not want the original STDOUT content. So, this one won't do cmd 2>&1 | grep pattern because it will mix the original STDOUT and STDERR. And this one doesn't work since grep doesn't read...

detecting asp.net redirecting users to login page

i have a directory in my website that is protected from anonymous users. my web.config looks like this <location path="members"> <system.web> <authorization> <allow roles="members" /> <deny users="*" /> </authorization> </system.web> </location> if anonymous users try to access pages in the "/members" directory they will b...

redirect to another URL issue in ASP.Net

Hello everyone, I have two web applications and sometimes I need user to jump from one application to another. Since they are two web applications and may reside on different domains/machines, I can not share session between them. The technical challenge for me is how to pass session information (I only need to pass userID string infor...

PHP headers forced download and then redirect

Right now I have a php form that forces a download of a zip. How can I redirect to another page and also force that download (where the download is actually php zip)? Would I use javascript? any ideas? Thanks! ...

What is the best way with Apache to redirect a blank subdomain to another subdomain?

I want any request to http://example.com/* to be redirected to http://www.example.com/*. Where * is any arbitrary path. ...

Redirecting from domain.com to www.domain.com keeping GET & POST data

Currently my web site shows the same data if people go to domain.com or www.domain.com. I would like to set up a redirect so all requests to domain.com will get sent onto www.domain.com. So a user who goes to domain.com will get redirected to www.domain.com. Just like what happens if you go to http://amazon.com/?a=b I don't want to lo...

In java under Windows, how do I find a redirected Desktop folder?

I know using .NET languages such as C#, one can do something like Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) to find the redirected location of the Desktop. However, under Java, I cannot think of a good way to do this. What is the most appropriate way to find a redirected user Desktop directory from Java, ...

How to get without "default.aspx" url ??

I implemented a following code in Global.asax file of my web application. void Application_BeginRequest() { string rule = ConfigurationManager.AppSettings.Get("WwwRule"); HttpContext context = HttpContext.Current; if (context.Request.HttpMethod != "GET" || context.Request.IsLocal) { return; } if (cont...

How determine redirect url

How can I know where a url gets redirected programatically? e.g. This url: http://scobleizer.com/feed/ redirects to the following url: http://feeds2.feedburner.com/fastcompany/scobleizer I am trying to read the xml document of feed. But the following lines of code: var doc = new XmlDocument(); doc.Load(url); will throw an exeptio...

Response.Redirect - using exceptions for flow control?

Response.Redirect has two overloads: public void Redirect(string url) Parameters: url: The target location. public void Redirect(string url, bool endResponse) Parameters: url: The location of the target. endResponse: Indicates whether execution of the current page should terminate. If I call the first overload, or call the second wit...

Redirecting from Global.asax in Medium Trust

I am attempting to do a redirect in the Application_Error handler in Global.asax. Nothing fancy at all. private void Application_Error(object sender, EventArgs e) { // ...snip... Server.Transfer(somePath, false); // ...snip... } This works great under Full trust, but I need to get it to work under Medium trust. The code I'm...

Redirecting URLs (with specific GET parameters)

I have this old survey link that is has been superseded by another link, so basically I want anyone trying to access the URL: http://mywebsite.com/survey/view_survey.php?surveyID=1 To be redirected to: http://mywebsite.com/survey/view_survey.php?surveyID=2 Can I do this in the Apache configuration or htaccess file? I tried the foll...

Rerouting stdin and stdout from C

I want to reopen the stdin and stdout (and perhaps stderr while I'm at it) filehandles, so that future calls to printf() or putchar() or puts() will go to a file, and future calls to getc() and such will come from a file. 1) I don't want to permanently lose standard input/output/error. I may want to reuse them later in the program. 2) ...

Linux terminal output redirection

I want to redirect the output of a bash script to a file. The script is: #!/bin/bash echo "recursive c" for ((i=0;i<=20;i+=1)); do time ./recursive done But if I run it like this: script.sh >> temp.txt only the output of ./recursive will be captured in the file. I want to capture the output of time command in the file. ...

Django: How to redirect to an external URL?

[Django 1.0.2] I have a view set up like this: (r'^redirect/(?P<object_id>\d+)/(?P<url>.*)/$', 'django.views.generic.simple.redirect_to', {'content_type': SiteType}, 'clickout'), When I get the following URL, two different things happen on local development server and on remote mod_wsgi server: # GET "/redirect/2/http://www....

DNS Gurus: How to forward www.domain.com to domain.com using DNS only?

I am running a blog at posterous.com, and they can host my domain name if I create an A record to their IP in my domain registrar's custom DNS tool. The problem is that I want my domain to ALWAYS read domain.com, so I want to have my DNS remap any requests to www.domain.com to domain.com, and I can't use .htaccess or PHP or other server...