Hello, everyone.
We've faced strange problem. We have log on service, that authenticates user, adds auth cookie and, finally redirects user to the page she posted to this service from.
So almost in all cases everything is OK. But on sometime on some random machine occurs a bug in this logic. Source page look and feel differs if user is...
I'm trying to create a redirect in a Django view to an external url with some get parameters attached to the request. After doing some looking around and some trying around, it seems I have hit a road block.
So my view looks something like this
def view(request):
data = get.data(request)
if something in data:
return Htt...
We have a situation where I have a bunch of urls with query params that are used to bascially redirect to various sites, kind of like a short URL or index.
Ex: www.mysite.com/abc?x=123 which redirects to www.google.com
www.mysite.com/abc?x=456 which redirects to www.yahoo.com
and so on...
The issue is that there isn't an actual pag...
Hi,
I've created an OnActionExecuted filter to populate some viewmodel attributes with data from db (I'm not using ViewData["somekey"], preferring many ViewModels descending from a common ancestor).
public class BaseController : Controller
{
protected DataClassesDataContext context = new DataClassesDataContext();
protected ove...
I'm no good at anything that requires regular expressions - this includes redirects.
I need to redirect all subpages to a particular subpage. Everything I've tried either fails or causes an infinite redirect loop.
Example: Say I want everything under the domain to redirect to www.test.com/fubar (but obviously not /fubar)
This seems li...
I have a Perl script which forks and daemonizes itself. It's run by cron, so in order to not leave a zombie around, I shut down STDIN,STDOUT, and STDERR:
open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!";
open STDERR, '>>/dev/null' or die "Can't write to /dev/nu...
Hi, this seems simple but I can't figure it out. I receive post data in my rails app through a form and I want to use a redirect (instead of a render) but keep at least one of the pieces of post data alive through the redirect. How can I do this? Adding a hash on to redirect_to doesn't seem to work.
...
Hello. In ruby, if you use mechanize following 301/302 redirects like this
require 'mechanize'
m = WWW::Mechanize.new
m.get('http://google.com')
how to get the list of the pages mechanize was redirected through? (Like http://google.com => http://www.google.com => http://google.com.ua)
OK, here is the code in mechanize responsible fo...
I'm trying to do this with .htaccess. So what I did was set a cookie named "domain" with the website I'm redirecting to. In my .htaccess file I have this
RewriteEngine on
RewriteCond %{HTTP_COOKIE} domain=([^;]+) [NC]
RewriteRule ^(.*)$ %1/$1 [L]
I got that code from a Google search. It's supposed to reditect http://mywebsite.com/some...
Hej there,
I am currently working on a PHP-based Tool to monitor a rather large number of URLs and their redirect status. I have spent quite some time on finding the best way to fetch the content of the HTTP response headers to extract the current redirect code and location. This is how it's done at the moment:
$resource = fopen( $url,...
Some setup:
We have some static images, publicly available. However, we want to be able to reference these images with alternative URLs in the image tag.
So, for example, we have an image with a URL like:
http://server.com/images/2/1/account_number/public/assets/images/my_cool_image.jpg
And, we want to insert that into our front htm...
I have an installation of YOURLS that redirects generated addresses to a different domain, however the root does not redirect. How can I set a rule that cooperates with the existing rules to achieve this? Here's the .htaccess file as it stands:
# BEGIN ShortURL
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteC...
Hey,
I'm developing under AIR using HTML + JavaScript. What I want to do is redirect the page ( something like window.location) using JS, to a local file (ex: login.html ).
I've tried window.location but it gives me the following error:
TypeError: Value app:/MYSCRIPT.html does not allow function calls.
I've also tried something using...
I have a migration project from a legacy system to a new system. The move to the new system will create new unique id's for the objects being migrated; however, my users and search indexes will have the URLs with the old ids. I would like to set up an apache redirect or rewrite to handle this but am concerned about performance with that ...
How can I prevent a user from accessing my app at example.appspot.com and force them to access it at example.com? I already have example.com working, but I don't want users to be able to access the appspot domain. I'm using python.
...
Before I throw something ugly together I thought this would be a good one to ask the experts.
So I've got a button that a user can click that:
a) Passes a variable from the element to a jquery function and posts to a php script like so (this works fine, though there is probably an easier way):
$(".complete_btn").live("click", function...
I have a flash video player which requests a flv file from a central server. That server might redirect the request to a server from the user's country if possible, a lot like a CDN.
This video player also reports usage stats. One thing I'd like to report is the true server/location from which the player is streaming the video from. So ...
My .htaccess redirects all requests to /word_here to /page.php?name=word_here. The PHP script then checks if the requested page is in its array of pages.
If not, how can I simulate an error 404?
I tried this, but it didn't work:
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
Am I right in thinking that it's wrong to redirect t...
I am using a jquery lightbox plugin (http://colorpowered.com/colorbox/) to load content using an iframe. The problem is when users access the page directly or via a search engine the page they are taken to is the iframe content itself and not the parent page which loads the iframe.
How can i redirect users who access the iframe directl...
I have a simple flow
A.html -> B.html -> C.html
Now, B either 302's to C, or shows a progressbar, and then after some ajax call is done goes to C. When the user is on C, and they hit "Back" I want them to end up on A instead of B.
If the page 302ed, then the back behavior is what I want, but otherwise they get that intermediary page....