redirect

Response.Redirect occasionally ignores URL encoding

In the website I'm currently building we need a large number of dynamic redirects, in order to maintain flow through parts of the site. I'm currently using response.redirect to achieve this, with the redirection URL being dynamically generated in the code behind on the postback method of various buttons. This is fine in 95% of the case...

301 Redirect. Need help. Having a hard time.

I'm trying to use mod_rewrite to redirect URLs and can't get anything to work. Here is what I'm hoping to do: Old URL: http://www.example.com/asp.pl?%5Fpuri=astore.amazon.com%2Fthegi02-20%2Fdetail%2FB0001L0DFA%2Fassid Needs to redirect to: www.example.com Anyone know of any way to do that? ...

htaccess redirect all html files

Can someone write me a rule that will redirect all requests for http://www.example.com/some_page.html to http://www.example.com/some_page/ Thank you!! ...

.htaccess redirect www to non-www with SSL/HTTPS

I've got several domains operating under a single .htaccess file, each secured via SSL. I need to force https on every domain while also ensuring www's redirect to non-www's. Here's what I'm using which doesn't work: RewriteCond %{HTTP_HOST} ^www.%{HTTP_HOST} RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI}/$1 [R=301,L] Example: h...

Qt, Getting the text when QPainter::drawText() is called

Hey, I have a QPainter object and would like to obtain the string that is drawn whenever QPainter::drawText is called, as I would if I could connect a slot to that signal (which doesn't exist, so I can't). What would be the best way to do this? I have read some stuff about redirecting the drawText method to a custom one using the setPro...

Using asp.net, how do I redirect a user and change the POST data at the same time?

I have a single sign-on solution, meaning that the user will login to one site and be redirected to another. When I redirect the user I want to pass along a key that can be used to verify the user's authentication status. Most of the examples of single sign-on I read show the login site passing the encrypted key has a query string val...

.htaccess Redirect request to files exts in particular folder only

Hi. How do you write rules to redirect all requests to *.php and *.html files in upload/ folder to a text file name forbidden.txt in root www folder. What I'm trying to do exactly is preventing script execution in this dir by redirecting those requests to the text file Note: The upload/ folder is accessibly by ftp used by a group of peo...

How to implement a login system in JSP

Hi everyone, A pretty basic JSP question, since I'm still trying to understand the right way to do things. I'm working on a web app which requires users to log in before working. What I'd like to happen is, anytime a user that isn't logged in tries to access any page (other than the login page), the user will be redirected to my login ...

submitting multiple files from shell script through standard input

I have a program which reads from standard input when invoked from the command line. Normally the user would enter some information, press C-d on a new line to signal end of file, and the program would process the file. Then the user would again be prompted, would enter some more text, and again press C-d to signal the end of the second ...

javascript changing the get parameter without redirecting

How can I just change the get parameter without redirecting? parent.location.search = "?after=20"; // ok that changes, but also redirect to the new page Any solution? Or answer is no, if its no, please write big no. ...

Cannot find .htaccess, can I create one? What else can I use to redirect html pages to blog posts

I have a website and want to redirect all its pages to posts on my blog. I browsed through my website folder but could not find the '.htaccess' file. Is it provided by the web hosting or can I create my own and use it? Can it be only used with Apache server. If that's not possible what other option do I have for redirection. Janice ...

obtaining POST parameters at a URL passed through by DYNDNS

Background: Foobar.htm form uses this: <form action="http://rawurl-here.gotdns.org" method="POST"> [...] </form> rawurl-here.gotdns.org is a Dynamic DNS url that redirects the user to: http://currentsite001.mysite.org Question: Is there a way to ensure that the POST parameters sent by Foobar.htm always reach the final target,...

Redirecting to specified controller and action in asp.net mvc 2 action filter

I have written an action filter which detects a new session and attempts to redirect the user to a page informing them that this has happened. The only problem is I can not figure out how to make it redirect to a controller/action combo in an action filter. I can instead only figure out how to redirect to a specified url. Is there a d...

S3 Redirecting Keys

Is it possible to set up redirects on s3 keys? I haven't been able to find any information on this online. ...

301 Redirect - matching a portion of the filename

[UPDATE] What I ask below just isn't possible. In which case, as my brain hurts, how can I simply redirect mydomain/folderA/folderB/name-0000.php to myNewDomain/folderC/folderB/name.php [/UPDATE] I currently have some URL's which follow the pattern below. /folder/folder2/name-name-id.php The content has now been moved to a new do...

symfony redirect with 2 parameters

how can i redirect to another action passing 2 or more parameters? this code: $this->redirect('input/new?year=' . $year . '&month=' . $month); results in URL: http://.../input?year=2009&amp;amp;month=9 ...

How do I redirect a browser to a local file in ASP.NET?

I want firefox to open C:\somefile.txt on the local drive. I've tried response.redirect with the "file:///" prefix, but it just inserts "Object moved to here." into the page. I also want to htmlencode the path because it could contain special chars... Edit: To be clear: C:\somefile.txt is a file on the client box running the browser...

IE6 and IE7 send HTTP/1.1 without hostname on redirect

we use Redirect-after-Post Pattern in our webapp. Sometimes very few error logs are shown in our apache log like this: [error] [...] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): ... in my acces log they show up as [...] "GET /xyz/ HTTP/1.1" 400 226 "-" "-" 72 What happens here is: The application se...

Remote site, local file redirection

As a followup on this answer: Specified javascript does work in case of a local website, but fails in case of a remote site. The firefox extension locallink helps in case of links, but is useless in case of the javascript solution provided by the linked answer. Please provide possible workarounds for redirecting to local files (unc) in ...

Htaccess redirect

I'm having trouble with setting up an htaccess redirect. I need to redirect the following: neemoil.com.au [OR] www.neemoil.com.au to neemoil.com.au/shop I also want it to redirect: neemoil.com.au/shop/* to neemoil.com.au/* Can anyone help? ...