redirect

ASP.NET MVC Login ReturnUrl always NULL?

Using Forms Authentication in ASP.NET MVC when trying to log back into a site, it puts a ReturnUrl parameter in the query string. My Logon action method accepts a "returnUrl" string. However it seems that returnUrl string is always null, even when it is clearly in the query string. Any thoughts on why this might be the case or a pos...

Redirecting URL's

How can I redirect www.mysite.com/picture/12345 to www.mysite.com/picture/some-picture-title/12345? Right now, "/picture/12345" is rewritten on picture.aspx?picid=12345 and same for second form of url (picture/picture-title/12323 to picture.aspx?picid12323) I can't just rewrite first form of url to second because i have to fetch picture ...

How to I stop an infinite redirect loop?

Hi, I have a blog that has a redirect loop, and I can't understand htaccess too well right now (late, and needs to be done by the AM) so am hoping for a quick fix. The site is throwing 301s from xxxxx.org to xxxxx.org/index.php, and back to the beginning. The htaccess file is as follows: # BEGIN WordPress <IfModule mod_rewrite.c> Rewri...

ASP.NET MVC - CustomeAuthorize filter action using an external website for loggin in the user

I have a CustomeAuthorize action filter that forwards the user to signin page if user is not authenticated. I apply this filter to actions or controllers. [CustumeAuthorize] public ActionResult MyAction() { //do something here return View(); } and the filter looks like this: public class CustomAuthorizeAttribute : ActionFilter...

IE8 stalls after 302 in new window

My client's website opens external links in new windows (with target="_blank"). The links are also routed through a logger which responds with a 302 redirect to the desired page. For example, instead of <a href="http://stackoverflow.com"&gt;...&lt;/a&gt; We have <a href="/redirect?to=http://stackoverflow.com" target="_blank">...</a>...

Redirect Apache to Tomcat - IllegalStateException when navigating in the app

Hi, I'm using Apache 2.2 and Tomcat 6.0.18 on Windows XP. I've enabled the mod_proxy module to redirect the traffic from my Apache web server to Tomcat. I only updated the httpd.conf file to have the redirection like this: ProxyPass /myapp http://MYMACHINENAME:8080/MyApp/Start ProxyPassReverse /myapp http://MYMACHINENAME:8080...

Redirect from within an Ajax form post

I have an action method that depending on some conditions needs to return a partial view via ajax, or redirect to another Controller/Action. The correct view is returned but it is placing it in the Ajax forms UpdateTargetId rather than redirecting to a completely new page. Anyone have any idea how I can accomplish this? ...

remove IIS 7 redirects

Hello, I am trying to debug an IIS server that keeps redirecting *.html files to *.aspx... it sends the following html in response to url.html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta htt...

How can I redirect after ActionResult has been determined?

In ASP.NET MVC I would like to do something like: Let a base controller check for the type of the ActionResult. If the ActionResult is a ViewResult, load some shared data for all views. If the shared data fulfills some specific criteria, redirect to a login page. How would you implement that? I thought about the following, but it ...

How to use > in an xargs command?

I want to find a bash command that will let me grep every file in a directory and write the output of that grep to a separate file. My guess would have been to do something like this ls -1 | xargs -I{} "grep ABC '{}' > '{}'.out" but, as far as I know, xargs doesn't like the double-quotes. If I remove the double-quotes, however, then...

Submit to External website and have site submitted from redirect to another page

I have to have a page submit to an external website. Not a problem. Problem is the external website displays a successful message, not good, I need to get the site it was submitted from to be redirected to something more user friendly. The external website won't redirect, which I think might be the easiest, if I pass it a redirectto p...

PHP, how to create count down timer?

How to do this: "you will be redirected to domain.com in 5..(4,3,2,1) seconds" in php??? ...

JSP Redirect: Session Loss Issues

Having replaced a <jsp:forward page="URL"> with a response.sendRedirect("URL");, I find I know lose the session once the redirect occurs. Is there a way to preserve the session with a redirect, or to reconstitute the session cookie and send it along with the redirect? I know I could use JavaScript via window.location = "URL";, but that ...

How do I programatically 301 redirect in an asp page?

I'm upgrading some classic asp pages to .net, but not all of them. Rather than go and modify all the links in this backwards system, which pulls some of its links from a cms data store. I would like to take advantage of http and just remove the code our of that file, and perform a programatic 301 so that all the other pages can just be u...

Redirecting to a "Thank you" page and offering the save dialog of downloaded file immediately

I am using ASP.NET2.0. I have created a download form with some input fields and a download button. When the download button is clicked, I want to redirect the user to a "Thank you for downloading..." page and immediately offer him/her the file to save. I have this following code to show the savefile dialog: public partial class ThankY...

JavaScript build options/tools

These days I find myself shifting out more and more work to the client side and hence my JS files tend to get bigger and bigger. I have come to the point where most HTML pages have half a dozen or more JS imports in the header and I realised that this is hurting loading times. I have recently discovered this script which lets you downlo...

Will redirecting a bunch of old dynamic URLs to a single new index page totally bone my pagerank?

I've got half a dozen legacy dynamic URLs and it turns out redirecting them all will require 18 Rewrite directives in my .htaccess file - that seems messy to me. What I can do however, is redirect all of them to my new start page with a single Redirect directive. It's a tiny site and all the pages people might come in from via google se...

bash: redirect and append both stdout and stderr

To redirect stdout in bash, overwriting file cmd > file.txt To redirect stdout in bash, appending to file cmd >> file.txt To redirect both stdout and stderr, overwriting cmd &> file.txt How do I redirect both stdout and stderr appending to file? cmd &>> file.txt does not work for me ...

How to redirect the output of .exe to a file in python?

In a script , I want to run a .exe with some command line parameters as "-a",and then redirect the standard output of the program to a file? How can I implement that? ...

Why does my asp.net membership login page not work with a redirect?

I have this membership site setup on my local machine using the ASP.NET membership provider. When I go to: http://localhost/admin/ It redirects me to http://localhost/Login.aspx?ReturnUrl=%2fadmin%2fDefault.aspx Which is fine. But after I put in my login information, the page just seems to refresh. It doesn't actually log me in, ...