redirect

Why would the browser cache assets (images, js, etc.) while GETting but re-request everything after a POST + 302 redirect?

We've got our ETags and expiry headers setup properly and when browsing around the site without posting it is really very snappy. However, after any POST (which is almost invariably followed with a 302) you can see the browser re-request all the images. Is there something that could be causing this? Is there a setting that handles thi...

Django Apache Redirect Problem

I'm configuring my Django project to run on Apache using mod_wsgi. I am attempting to run Django below the directory 'cflow' on apache, but am running into problem with redirects. My apache conf looks something like this: ... WSGIScriptAlias /cflow "C:\Program Files\Apache Software Foundation\Apache2.2\wsgi\django.wsgi" <Directory "C:\...

MOSS 2007: 3 additional assembly binding redirects, where are they coming from

Hi, I have a web.config of a functioning MOSS server with our custom settings and a web.config of a freshly installed MOSS. Here's 3 redirects I don't know the source of: <dependentAssembly> <assemblyIdentity name="Microsoft.SharePoint.Portal.SingleSignon" publicKeyToken="71e9bce111e9429c" culture="neutral" /> <bi...

ASP.NET: How to redirect, prefilling form data?

i want a handler to redirect to a web-forms page, pre-filling in the values of some controls on the form. i tried setting my current Request.Form data: if (theyWantToDoSomething) { //pre-fill form values context.Request.Form["TextBox1"] = "test"; context.Request.Form["ComboBox1"] = "test 2"; context.Request.Form["TextBox2"]...

Problems redirecting old domain to new with Apache and htaccess

My homepage is located at www.nazgulled.net and I bought a new domain which is www.ricardoamaral.net. Both these domains point to the same exact server. I'm having two problems with the redirection, my current code is this: RewriteCond %{HTTP_HOST} ^(www\.)?nazgulled\.net [NC] RewriteRule ^(.*)$ http://www.ricardoamaral.net/$1 [L] Fo...

How to create path redirections

I want to create internal path redirections like in Wordpress e.g. if i have a post (having permalink = 'hello-world') but still if I type 'http://localhost/hello/', I get redirected to 'http://localhost/hello-world' So what code do i use to automatically go to that page with that correct URI, i.e. change the URI that gets displayed in...

Maintaining page number after redirect in CakePHP

I have an index view that lists items, and it's a long list so I use Paginator to limit items to 50-to-a-view. Each item has an "edit" link that goes to an edit view with inputs/validations/etc. When that form is submitted, I redirect the use back to the index view. So far so good, but here's the rub: If a user is on page N of the in...

How to display messages to the user after a POST + HTTP redirect

I’m using the PRG pattern to avoid multiple form submission. It has, however, a serious drawback — you cannot simply echo the confirmation message to the user (obviously, the user won’t see the page, he will be redirected to another one). What are the solutions to this problem? I know two of them, but none of them seems perfect. Use a...

Get HttpWebResponse headers WITHOUT redirecting

I want to check if a particular page gets redirected or not. However, whenever I try this the headers I get back seem to be from the redirected page, not the initially requested page (and, in particular, the status is OK rather than the 302 I want to see). Is there something I can set so that it won't automatically follow the redirects?...

htaccess redirect append query string?

I have an htaccess redirect that needs to forward the query string to the new URL, but it's getting dropped after the redirect. Can someone tell me what's wrong? RewriteRule ^services/agents.*$ https://services.example.com/agents/ [R=301,L,QSA] ...

Redirecting old .aspx files to Wordpress equivalents

I've converted an associates old website to Wordpress. The domain name remains the same. All the old .aspx files fall into the root of the domain folder (www.xxx.com) with no .htaccess file while the Wordpress replacement site has an .htaccess file - domain is www.xxx.com/ctpc I have 36 old .aspx files in the root that I need to pe...

How Does Piping Work in Linux?

Probably a simple question but... How does piping work? If I run a program via CLI and redirect output to a file will I be able to pipe that file into another program as it is being written? Basically when one line is written to the file I would like it to be piped immediately to my second application (I am trying to dynamically dra...

Redirecting in CakePHP

Is there any other command for redirecting a controller to a particular view page other than redirect and render? I have the redirect as $this->redirect('/forms/homepage/'.$userId); But if I give $this->render('/forms/homepage/'.$userId); it doesn't get redirected to that page. Is something wrong? ...

SEO friendly 301 redirect .htm to .aspx

I currently have a small-midsize website with .htm extensions. I have redesigned the full website, this time using a .aspx extension. I want to issue 301 redirects to keep my search engine rankings, but am unsure of how to do so from an .html page in a spider friendly way. With research I have repeatedly encountered references to ISAPI r...

adding a trailing slash for specific redirection rules

I'm moving a website to Wordpress and simultaneously changing the convoluted URL structure they had on their old platform. A typical URL looks something like this: /blog/index.php/weblog/comments/post-name But could also look like this: /blog/index.php/weblog/comments/post-name/ (not the inconsistent use of the trailing slash) This ...

How can I send a 301 Permanent Redirect with ASP.NET ?

I need to permanent redirect some pages, and redirect the user to the new URL as well. This code only sets the correct headers. The user are not redirected. public static void PermanentRedirect(this HttpResponse response, string newUrl) { response.Status = "301 Moved Permanently"; response.StatusCode = 301; response.AddHeader("Lo...

WinForms WebBrowser Control - problems on redirect (C#)

I'm using a webbrowser control in a C# application. Everything works great until there is an automatic redirect on a website. When this happens, any call to webbrowser.DocumentText gives me this error: System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) at System.Windows....

can i repost or carry POST data (if so, can i do it with redirects?)

I want to redirect the user to another page to fill out a captcha but i would like to keep the post data. When/if the user succeeds i like to add an captchaPass=true and would like access the post data and continue processing. Right now i am using redirects but ATM i am not required to use it. Is it possible to carry the post data? keep...

Django form redirect

I have a form that and after the user fills in this form, I want to redirect to a URL that looks something like this r'^user/(?P<id>\d+)/$' The <id> is the primary key in the database...how do I go about this coz I'm stuck at this point ...

Sniffing LPT Traffic

I need to intercept LPT output traffic. After a couple of hours of research, I've come to understand that the only way to do this is by writing a kernel-mode driver, more precisely a "filter driver"...? I've downloaded the WDK, but the terminology and vast number of driver types is a little overwhelming. I'm basically trying to underst...