redirect

How do I prevent an included PHP script from changing the Location URL?

I'm including a PHP script that changes the URL. // index.php ob_start(); include "script.php"; // This script redirects using header("Location:"); $out = ob_get_clean(); // I use the $out data for calculations echo $out; Is there a simple way to counter or undo this unwanted redirect? How about: header("Location: index.php"); ...

aspx page to redirect to a new page

What is the code required to redirect the broweser to a new page with an ASPX page? I have tried this on my page default.aspx : <% Response.Redirect("new.aspx", true); %> or <%@ Response.Redirect("new.aspx", true); %> And these result in a server error that is undetermined. I cannot see the error code because the server is not i...

Turning off redirect loop error in apache

I'm crawling a website using php. As I don't know much about turning php into a CGI and runing from command line the method I've chosen is, after one succesful iteration, to redirect back to the same php file so it runs again (it's not an infinite loop as I use both a cookie and a timestamp check to make sure it ends within a set time or...

JavaScript Redirect based on Referrer?

Hey Folks, Is there anyway to grab the referring URL using javascript, lets say the reffering url is http://page.com/home?local=fr, then redirect a user to a new page with the same local as the reffering page (http://page.com/login?local=referring local)? Pseudo code would be something like this: var referringURL = document.referrer; ...

apache redirect from non www to www

I have a mortgage calculator site that doesn't seem to redirect from mookal.com to www.mookal.com My apache config is as follows: RewriteEngine On ### re-direct to www RewriteCond %{http_host} !^www.mookal.com [nc] RewriteRule ^(.*)$ http://www.mookal.com/$1 [r=301,nc] what am I missing? thanks! ...

How do I force the browser to update its base URL

I have a PHP script that uses CURL to fetch a remote page and return the output as is. It displays fine in the browser, but the problem is, when I click a link it is still using the old base url. Can I force the browser with some kind of HTTP Header or something to use the base url of the server that I fetched the page from in my PHP scr...

How to redirect a feed page using .htaccess?

I just moved my blog from Drupal to Wordpress and im currently having some problems with my old feed. The old adress for my feeds were http://bemcapaz.net/rss.xml and the current is http://bemcapaz.net/feed/, i already made the changes on feedburner and the new feed is working but the old one isnt and i dont want lose all my old readers...

How does one avoid a cyclic redirect when writing a facebook application using pyfacebook and google app engine?

Hello. I'm trying to write my first application for Facebook using python and pyfacebook hosted on Google App Engine. The problem I'm facing is that of cyclic redirects. Firefox dies complaining "This page isn't redirecting properly" when I visit http://apps.facebook.com/appname. Here's the code: class CanvasHandler(webapp.Reques...

Redirect all requests for a subdirectory in Tomcat 6.0

Hello All, I'm running a local Tomcat 6.0 server on my desktop. I'm trying to redirect any and all requests matching http://localhost:8080/RedirectDirectory/abc/efg/morejunk to a single JSP page. In my RedirectDirectory project's web.xml I have <servlet> <servlet-name>IOPRedirect</servlet-name> <jsp-file>/RedirectDirectory/filetree....

jQuery AJAX trampoline redirect

I am working on site where users get a 30 minute cookie and after it expires, any calls to the server redirect to a "session expired, click here to re-login screen." Here's the wrinkle: When the user gets to the session expired page, the URL of that page is that of the page they were trying to reach. Clicking the "Login Again" link tak...

redirection of pages

how i can redirect from my login page to home page after the login is success? I have one database in this it stores the username and password. at the time of login it wil check the user name and password by sql query. my code is shown below. protected void Button1_Click(object sender, EventArgs e) { if (TextBox1.Text == ""...

Apache .htaccess hotlinking redirect

I am trying to create a redirection when someone hotlinks images in one directory on my site. If someone hotlinks an image, I want to redirect them to a corresponding image (same file name) in a different directory. If someone hotlinks: www.mydomaoin.com/PlayImages/Basic/Embedded/{ImageName.gif} I want it to redirect to: www...

Problem with a URL that ends with %20

I have a big problem. There are devices in live that send the URL "/updates ". It's a typo of the developer for those devices. In the server logs, it looks like "/updates+". I have a ManageURL rewriting module that handles all requests without extension. But this request causes an HttpException: System.Web.HttpException: System.Web...

How can I preserve session information when redirecting from one subdomain to another?

I'm programming with PHP. I want to redirect https://abc.example.com/blah1/blah2 to https://www.example.com/blah1/blah2 but I don't want to redirect https://abc.example.com redirect to https://www.example.com Is it possible while preserving session information across the redirections? Thank you. ...

How to Redirect To Same Page on Failed Login

The Django framework easily handles redirecting when a user fails to log in properly. However, this redirection goes to a separate login page. I can set the template to be the same as the page I logged in on, but none of my other objects exist in the new page. For example, I have a front page that shows a bunch of news articles. On the ...

Isapi Rewrite - preserving HTTPS in redirects behind load balancer

Hi, I'm running a site which has 2 separate sub-domains - one for HTTP and another for HTTPS. http://www.example.com https://secure.example.com http://secure.example.com does not exist and will not resolve. The problem is that the site is running behind a load balancer which handles all SSL. Communication between the load balancer ...

301 redirect htaccess subfolder problem

I am having a problem getting some of my 301 redirects to work correctly in htaccess. The problem is the subfolders on the new link do not line up: Redirect 301 /properties/available-properties/filename.html http://www.domain.com/index.php/properties/available/new-filename the problem is that it returns the path of: www.domain.com/ind...

htaccess subdomain redirct with last url parameter

I want to write a .htaccess file for redirecting my subdomains and URL's last variable to a new location. Here is what I want to do: http(s)://abc.example.com/books I want my internal URL to be like: http://example.com/?name=abc&amp;type=books I have already gotten the subdomain redirect to work but I am not able to do subdom...

Post-Redirect-Get in ASP.NET

Hi all, i do Postback in my Page1.aspx to another page. If a press F5 key in Page1.aspx its appears the message (To display the webpage again, Internet Explorer needs to resend the information you've previously submitted. If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to d...

How to tell Apache, in reverse proxy mode, to intercept or trap 302 responses from backend server and redirect internally without sending 302 response back to client?

Hi, Does anyone knows how to tell Apache, in reverse proxy mode, to intercept or trap 302 (or 30x) responses from backend server and redirect internally without sending 30x response back to client? Ultimately, the backend server the response is redirected to would not be accessible from the outside (or not listed in Apache conf). My si...