Search Results

Search found 1385 results on 56 pages for 'redirects'.

Page 40/56 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Handling static files with Django / lighttpd

    - by ptikobj
    I know that there is already a question (actually some more) about this, but the answers to them didn't help me out very much, as I am pretty new to lighttpd. I have one folder which contains .pdf-files. When doing a HttpResponseRedirect to the locations of one of those .pdf-files, the user should be able to download the .pdf file (or view it in the browser). Right now, Django just redirects to my "home" html page, without showing any pdf-file. Somehow, I will have to tell lighttpd that Django shouldn't handle this directory anymore. Is this the only thing I need to do? If yes, how should i do it?

    Read the article

  • Facebook email Permission, oath2, doesnt work?

    - by Mathias Eklöf
    since the new Auth Dialog from Facebook (for my App & homepage), I cannot get the dialog to show that my homepage/app needs the users email when connection to my homepage/app. In the Auth-section of my app I've added "email" to the User & Friend Permissions. Also I've added it to the referal when someone clicks the "Login with facebook"-button. When someone clicks the Facebook-button, he/she redirects to a page which has the PHP-code with Facebook SDK PHP (latest). Here's how I generate the send-to-url for the dialog: $login_url = $facebook-getLoginUrl(array('req_perms' = 'email,publish_stream')); header("Location: ".$login_url); But when the Dialog pops up, the only permission request it does is "basic information". I need to request the Email. Am I stupid or is it a bug somehow? I've also recreated the App.

    Read the article

  • C# (With .NET & Visual Studio) WebForms - How can I get the title of a page ..?

    - by Ashley Davies
    Prety long question; How can I do the following in C#: Open a webpage (Prefferably not visible) Check whether the page redirects to a different page (Site is down, 404, etc.) Check if the title is not equal to a said string Then seperately, (They need to click a confirm button) open their browser, and go to the adress of the first (It'll be the only one) hyperlink on the site. I literally have been looking on google for ages and haven't found anything similar to what I need. Whether you give me a link to a site with a tutorial on this area of programming or actual source code doesn't make a difference to me.

    Read the article

  • Errors not being redirected to an Http handler if redirectMode="ResponseRewrite"

    - by Luk
    I see similar questions, but it looks like there were due to an unrelated issue. in 3.5, I have a custom error handler that logs errors and redirects users. My web.config is set up as such: <httpHandlers> <add path="error.ashx" type="MySite.Tools.WebErrorLogger, MySite.Tools" verb="*"/> </httpHandlers> <customErrors mode="On" defaultRedirect="error.ashx" redirectMode="ResponseRewrite"> </customErrors> When redirectMode is set to "ResponseRedirect", everything works fine (but Server.GetLastError() being null but that seems to be intended) However, when using ResponseRewrite, my handler is not called and I see ASP.Net default error pages. Any idea on how I could do this? (I unfortunately can't use either an aspx page or do my error handling in global.asax due to other constraints)

    Read the article

  • asp.net page flickers

    - by user464111
    I have an asp.net webform. I have the background as an image,that when i aslo have a menu bar, when i click on an icon, it uses response.redirect() to redirect to a new page, but when it loads up the page, it seems like the background image is slow. I can see the backgroud as white first and then split seconds later the background image will load up, this causes an illusion of flickering when it redirects to a new page. How do i solve this problem? When i tested using visual studio web server, it dont flicker. I am using a background image in the master page hosted up on the internet.

    Read the article

  • Help with redirect and query strings

    - by James
    I'm a total novice at mod rewrite so I'll try and present my question as clearly as possible: I'm trying to create a url redirect of the following (static) affiliate url that can append it self to any product links after using a query string: affiliate url: hxxp://clk.affilite.com/fs-bin/click?id=aFb*BBBBBpQ&subid=&offerid=9999.2&type=5&tmpid=9999&RD_PARM1= product url: hxxp:// example.domain.com What I want to achieve is redirecting the affiliate code as below and being able to add dynamic product urls after as the following examples show: rewritten affiliate url: hxxp://domain.com/go affiliate url + product url: hxxp://domain.com/go?=http://example.domain.com redirects to: hxxp://clk.affilite.com/fs-bin/click?id=aFb*BBBBBpQ&subid=&offerid=9999.2&type=5&tmpid=9999&RD_PARM1=http://example.domain.com

    Read the article

  • Need a good website URL to test against

    - by Zombies
    I need a URL to just test basic http connectivity. It needs to be consistent and: Always be up Never change drastically due to IP or user agent. (IE: 301 Location redirect/ huge difference in content... minor would be tolerable) The URL itself has a consistent content-length. (IE: it doesn't vary from by 2kb at most, ever) A few examples, yet none match all 3 criteria: One example of always up: www.google.com (yet it 301 redirects based on IP location). Another good one is http://www.google.com/webhp?hl=en. but the problem there is that based on a given holiday, the content-length can really vary.

    Read the article

  • Windows Server 2008 R2 Service Pack 1 issue

    - by saj
    Net 4.0 websites running on a Windows Server 2008 R2 server using IIS 7.0. The websites allows Single Sign on via an encrypted token passed in a query string e.g. www.mywebsite.com?token=1159CE30A4ED1148E86D779AC7A1CF4DC75CCEC7213401D13CA181A2ED1C29A8. However, after installing Service Pack 1; SSO has stopped working and the website redirects to www.mywebsite.com. The redirect occurs before any code is hit. No idea what is causing this and any ideas would be much appreciated.

    Read the article

  • "more" as a target of piped command breaks bash

    - by xavier
    Consider following source, reduced for simplicity int main() { int d[2]; pipe(d); if(fork()) { close(1); dup(d[1]); execlp("ls", "ls", NULL); } else { close(0); dup(d[0]); execlp("cat", "cat", NULL); } } So it creates a pipe and redirects the output from ls to cat. It works perfectly fine, no problems. But change cat to more and bash breaks. The symptoms are: you don't see anything you type pressing "enter" shows up a new prompt, but not in a new line, but in the same one you can execute any command and see the output reset helps fixing things up. So there is a problem with input from keyboard, it is there, but is not visible. Why is that?

    Read the article

  • What's the best way to debug AJAX to PHP calls?

    - by Jascha
    I'm having a miserable time debugging one small function on my new project. Essentially I'm having a user log out via an AJAX call to my log out script on my server called "userfFunctions.php" I'm using AJAX so that I don't have the headache of writing more regex to match my mod_rewrites. Anyway, every so often, it seems as though my Post data just flat out dies and since the PHP is running behind the scenes, I feel like I have no way of finding out where the data flow is being disrupted. BTW This function works 19 hrs of the day. Here is the javascript function: function logOut(){ var data = new Object; data.log_out = true; $.ajax({ type: 'POST', url: 'http://www.mydomain.com/User_Validator', //<-- redirects to userFunctions.php data: data, success: function(data) { alert(data); // <-- a response is triggered but with no response data! } }); } the php side: if(isset($_POST['log_out'])){ echo 'alert this!'; } here is my awesome response:

    Read the article

  • RewriteCond and RewriteRule in .htaccess

    - by RD
    I have a client folder located at http://www.example.com/client However, I've now installed SSL on the server, and want to add a permanent redirect using HTACCESS so that whenever /client is accessed, that it redirects to: https://www.example.com/client Anybody know how to do that? I've redirected my domains in the past like this: RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^www.example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] This should not affect the solution, but the site must still redirect to www.example.com FIRST, and then to https://www.example.com/client if for example, http://www.example.co.za/client is entered.

    Read the article

  • Where should I place a function that I want to run before the cached page is served (Drupal)

    - by kidbrax
    We have a intranet site that runs on Drupal. If an employee hits the site from outside our network they are required to login first. If they are already in our network, they can browse around freely. So we have a function that checks where they are coming from and redirects them to a login page if they are from outside. If we enable caching, they are not redirected because the cached page is rendered without running our function. The code currently exists inside of the theme_preprocess function. Where can I put it so that it always runs before the cached pages are served?

    Read the article

  • CakePHP delete() function is not working

    - by Logic Artist
    Hello, Im just cracking open cakePHP (v1.3.2). I set it up on my local wamp server, seems to work fine except the delete() function doesn't work. I'm following their blog tutorial exactly, its as simple as it can be so I don't understand why its not working. Heres the function in my PostsController class: function delete($id = NULL) { $this->Post->delete($id); $this->Session->setFlash('The post with id: '.$id.' has been deleted.'); $this->redirect(array('action'=>'index')); } The "Delete" link's url looks like http://localhost/posts/delete/id:1 (where the id number matches the particular post, obviously). It redirects and sets the flash message, however there is no number where $id should be in the message, and the post isn't deleted. It seems the proper id is passed through the url, but I don't think it is getting into the function. I dont get it. Any ideas???

    Read the article

  • .htaccess cross browser

    - by lordsharp
    Hi, Im trying to load a custom error document for a 404 error using a .htaccess file on a linux server, the page gets the current page URL then redirects to another site (which is retrieved from a db) based on an id it retrieved from the URL. The current error documents are stored here: /error_docs/ - i dont have permission to upload anything other than the HTML files that are already in there /HTTPDocs/301redir.php is the site root where the .htaccess file is. i have used the following to load the 301redir.php page as the error doc, which works in FF but no other browsers. ErrorDocument 404 /310redir.php using .htaccess is my only real option for changing this, is there a way to get around this issue and make it work across all browsers?

    Read the article

  • Authenticating a user for a single app with multiple domains

    - by hofnarwillie
    I have one asp.net web application, but two different domains point to this web app. For instance: www.one.com and www.two.com both point to the same web app. I have an issue where I need certain pages to be on a specific domain (due to some security requirements from our online payment provider - a third party website). So let's say page1.aspx needs to be called on www.two.com The process is as follows: A user logs into www.one.com The authentication cookie is saved to the browser The user then navigates to page1.aspx and, if on the wrong domain, gets redirected to the correct domain. (this redirection happens on page1.aspx in the page_load event) Then asp.net redirects the user to the login screen, because the authentication cookie is not sent to www.two.com. How can I track the user and keep him/her logged in between the two domains?

    Read the article

  • In ASP.NET MVC, how does response.redirect work?

    - by Swoop
    I have used response.redirect in classic ASP and ASP.NET webforms. However, with MVC 2.0, I am running into something peculiar. I have a private method in a controller class that is used by multiple controller methods to help load and validate some information. This private method is setup to redirect if a problem is discovered to a generic error message page. The big problem I am noticing is that the calling controller class and page view attempt to complete rendering and loading before the redirect actually takes place. This is annoying in development because the View throws exceptions that I need to ignore before my generic error page finally loads. As mentioned above, I am used to the older model of response.redirect which prevented subsequent code on a page from being executed as the new page would then load. Any help or advice on redirects in MVC would be greatly appreciated.

    Read the article

  • CSRF verification failed, but only with Facebook App

    - by dkgirl
    I am creating a Facebook App using Django. When I access my webpage directly then it works fine. I have then added this webpage as the Facebook canvas URL, so that users are directed to this page when they go to the App. Now, when I enter the App, I get the "CSRF verification failed" error. I think it's because facebook is doing a POST, but without the CSRF token. However, I cannot control how Facebook redirects to my App. Anyone know how to deal with this? This is all my View does: def frontpage(request): return render_to_response('tube/frontpage.html', {"s": 'hello'}) and frontpage.html just writes "front page!"

    Read the article

  • IIS Multiple Domain Redirect

    - by bingles
    I currently have 2 domain names that I want to setup different websites for. I am currently looking at using some free hosting that works well for my current needs but doesn't give me any way to point "mydomain.com" to the actual site. Instead I have to give users a longer, harder to remember url. My proposed solution is to point my domains to my home ip and host a small ASP.NET app through IIS consisting of a redirect page that simply redirects to the appropriate site. Is there a way in ASP.NET to recognize which domain url was requested in order to know where to redirect the page to?

    Read the article

  • Is there a way to force JUnit to fail on ANY unchecked exception, even if swallowed

    - by Uri
    I am using JUnit to write some higher level tests for legacy code that does not have unit tests. Much of this code "swallows" a variety of unchecked exceptions like NullPointerExceptions (e.g., by just printing stack trace and returning null). Therefore the unit test can pass even through there is a cascade of disasters at various points in the lower level code. Is there any way to have a test fail on the first unchecked exception even if they are swallowed? The only alternative I can think of is to write a custom JUnit wrapper that redirects System.err and then analyzes the output for exceptions.

    Read the article

  • .htaccess Problem

    - by ocergynohtna
    I'm having trouble with redirecting urls using the .htaccess file. This is how my htaccess file looks like: Redirect 301 /file-name/example.php http://www.mysite.com/file-name/example-001.php Redirect 301 /section-name/example.php http://www.my-site.com/section-name/example-002.php RewriteEngine on RewriteCond %{HTTP_HOST} !^www.mysite.com$ [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)/(.*)$ hqtemplates/articles.php?file_name=$2 [L] php_value session.use_only_cookies 1 php_value session.use_trans_sid 0 Now the problem is that when I go to page: www.my-site.com/file-name/example.php instead of redirecting me to www.my-site.com/file-name/example-001.php it redirects me to www.my-site.com/file-name/example.php?file_name=example-001.php. For some reason it adds "?file_name=example-001.php" to the url. Anyone know's why this is happening and how to fix this?

    Read the article

  • MVC Pages that require the user to be logged in

    - by keithjgrant
    I'm working on a little MVC framework and I'm wondering what the "best way" is to structure things so secure pages/controllers always ensure the user is logged in (and thus automatically redirects to a login page--or elsewhere--if not). Obviously, there are a lot of ways to do it, but I'm wondering what solution(s) are the most common or are considered the best practice. Some ideas I had: Explicitly call user->isLoggedIn() at the beginning of your controller action method? (Seems far too easy to forget and leave an important page unsecure on accident) Make your controller extend a secureController that always checks for login in the constructor? Do this check in the model when secure information is requested? (Seems like redundant calls would be made) Something else entirely? Note: I'm working in PHP, though the question is not language-dependent.

    Read the article

  • Using ASP.NET Redirect without string URL?

    - by David Dietrich
    For instance, what I have right now is the following: Page.Response.Redirect("Default.aspx", false); Needing to hardcode the string just seems odd to me. The Default.aspx page is already in my project. So is there a way to do the redirect something like the following: Page.Response.Redirect(Default.aspx, false); Where Default.aspx is just the web form. I'd think that this way it would be obvious if there was a problem such as you deleted the web form but didn't update the redirects. Is this possible? Or is there another way entirely I should be looking at this? I suppose I could do something with a static property on the class, but I am wondering if there is a built in thing for this?

    Read the article

  • Prevent .htaccess syntax error

    - by seengee
    Hi, As part of one our system's we enable a user in the backoffice to add a block of 301 redirects should they need to. This is just a textarea which then populates a specific area of a .htaccess file. As much as this may seem insecure it has only previously used internally by people who know what they are doing but for various reasons they cannot access the specific file. We need now to allow more access to this function, not for the general public, but for people that probably have far less knowledge of regexp etc and syntax in htaccess files. Obviously the major concern here is the user enters some bad syntax and makes their entire site, including the backoffice where they could fix the issue, totally inaccessible without manual intervention. What approaches can i take to make sure that they do not break their site? A htaccess syntax check? copy the file elsewhere and check it doesnt generate a 500 error (with cURL or similar)?. Would welcome any ideas. Thanks.

    Read the article

  • Multiple HTTP request - Rails

    - by bradleyg
    My application checks a number of domains to see if they are valid (approx 100). I have the following code to check a single domain: def self.test_url uri, limit = 10 if limit == 0 return get_error_messages("001") end begin url = URI.parse(uri) response = Net::HTTP.start(url.host, url.port).request_head('/') rescue SocketError => e return get_error_messages("002") end case response when Net::HTTPRedirection then test_url(response['location'], limit - 1) else return get_error_messages(response.code) end end The code checks for the response code while taking into account redirects. This works fine. The only problem I have is when I put this in a loop I want it to run in parallel. So I don't have to wait for domain 1 to respond before I can request domain 2. I have managed this in PHP using curl_multi to run the requests in parallel. Is there a similar thing I can do in Rails?

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >