Search Results

Search found 4963 results on 199 pages for '302 redirect'.

Page 63/199 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • How to detect page redirect with PHP?

    - by blabus
    I'm trying to detect whether an image exists on a remote server. However, I've tried several methods and can't get any of them to work. Right now I'm trying to use this: if (!CheckImageExists("http://img2.netcarshow.com/ABT-Audi_R8_2008_1024x768_wallpaper_01.jpg")) { print_r("DOES NOT EXIST"); } else { print_r("DOES EXIST"); }; function CheckImageExists($imgUrl) { if (fopen($imgUrl, "r")) { return true; } else { return false; }; }; But it returns 'true' whether the image actually exists or not (the above image should, but change it to gibberish and it still will return 'true'). I have a feeling it could be because if the URL does not exist, it redirects to the homepage of the site. But I don't know how to detect that. Thanks for any help!

    Read the article

  • ASP.NET MVC - Wrong redirecting, how to debug?

    - by Xorty
    I am stuck with redirecting problem in ASP.NET MVC project. I have mapped tables via LINQtoSQL and each has unique ID as primary key. I am implementing functionallity of 'CREATE'. Basically, after new value is added into SQL table (which means I pressed Save button), I want to be redirected to Details of this freshly added item. Here's little code how I am doing it : [AcceptVerbs(HttpVerbs.Post), Authorize] public ActionResult Create(Item item) { .... return RedirectToAction("Details", new { id = item.ItemID }); Trouble is, I am never redirected to Details view (I have Details.aspx view for items). When I check CallHierarchy in Visual Studio (2010 pro) the hierarchy is indeed little strange, like this : RedirectToAction(string,object) Calls To 'RedirectToAction' Create Calls To Create (no results) Calls From Create (methods of created instance. From there I'll get back to 'RedirectToAction' and to 'Calls to Create' and 'Calls From Create' etc. etc. - loop Edit Calls From 'RedirectToAction' Not supported I am looking for some tools or more specifically 'know how' (since VS probably has some tools) to debug this kind of situations. PS: rooting is default :"{controller}/{action}/{id}", Thanks

    Read the article

  • send post data in jsf

    - by milostrivun
    I just cannot figure this out, it looks really simple but I'm relatively new at jsf. Here is the old stuff: Plain old html form tag like this: <form name="someForm" action="somewhere" method="post"> <input name="param1"/> <input name="param2" /> </form That is sending data by post to a location specified in the action attribute of the form. The new stuff: <h:form id="paymentForm"> <h:panelGroup> <h:inputText id="param1" value="#{facesView.param1}" ></h:inputText> <h:inputText id="param1" value="#{facesView.param2}" ></h:inputText> <h:panelGroup> <h:commandLink>Submit</h:commandLink> </h:panelGroup> </h:form> This other new stuff doesn't work. 1.How do I specify to this h:form where to go(like setting action in old html) because I need it to go to a totally new url. 2.how to pass params with POST? Any help is appreciated. Milos

    Read the article

  • MVC 4 iframe embedded in desktop page showing mobile view

    - by Reto Laemmler
    I use Index.cshtml and Index.mobile.cshtml. My Index.cshtml is a mobile app landing page containing an iframe to live demo the mobile web app. Index.mobile.cshtml is the mobile web app itself. The problem is, the iframe keeps loading the desktop version itself. As far as I know, I cannot configure the user agent of the iframe to a mobile type. It should be solvable with some routing but I couldn't figure out how!?

    Read the article

  • PHP: Check if URL redirects?

    - by Industrial
    Hi everybody, I have built a secured login backend that controls if a user is logged in or not. If not, the user is redirected to a login page. I would like to make a PHP function that iterates through a number of set url:s (array with url:s) to see if they are redirected or not. How could this be done? Thanks

    Read the article

  • Is it possible to maintain the url while redirecting to a classic asp page from a controller?

    - by Matthias
    While migrating a site from a classic asp to MVC, I'm having the problem that not all controllers are implemented yet. For those which are not implemented, I'd like to serve the classic asp page (say /product.asp?id=123) while maintaining the nice url /product/123. To accomplish this I implemented a dummy ProductController which returns a RedirectResult to the classic asp url. But that changes the url in the browsers navigation bar. Requirement has it, that the urls should always be a clean (mvc) one, eventhough the page has not yet been fully migrated. If this can't be done using a dummy controller, what would be an alternative option to solve this problem? Thanks in advance!

    Read the article

  • How do I prevent form from redirecting after submission?

    - by Noor
    I have searched the site and I've found various solutions, most of them suggesting using return false; Problem is that I'm using this piece of code to submit the form: $(function() { $("#snd").click(function() { var dendar = "http://" + $("#inpt").val() + ":" + $("#pwd").val() + "secretsite.lol/something.xml"; $("#formen").attr("action", dendar); $("#formen").submit(); alert(dendar); return false; }); }); The alert is just there to let me know that the form has been submitted.. Thanks guys!

    Read the article

  • remsh rsh error redirect problem

    - by soField
    using following command on hp-ux remsh opera -l myuser crontab -l /opt1/exp_opera_crontab 2/opt/a.log and when i echo $? i get 0 because its executing crontab -l on remote machine but i dont have opt1 directory so export wont be copied to my local machine in /opt1/exp_opera_crontab i dont get any error about this when i run this remsh or rsh command is there any way to identify both of remote and local machine related errors and redirecting them into my local machine ?

    Read the article

  • GET and POST on the same page?

    - by Phil
    I am creating a commenting script and I came across a problem. I am having to use $_POST and $_GET on the same page, which I don't think makes sense. I am very new to php and am training myself. I have a page named viewVerses.php - this has a lists of verses. When someone follows the reply link, echo '<br /><a href="reply.php?verseid='.$verseid.'">Reply</a>'; I'm passing the verseid (commenting on bible verses) into the reply.php, so that a query may be made with that verseid. (This is so that the user can still see the verse he/she is commenting on). Now reply.php has the form in it for posting a reply. The form goes to postReply.php This is in postReply.php $title = $_POST['title']; $body = $_POST['body']; $verseid = $_GET[verseid]; Can I get the verseid from the url and the POST the values from the form in the same page? If not, is there a way I can do this better? Remember, I am new at php and probably won't implement a solution that is super hard. I have to get it for my to put it in my site. I hope this is clear

    Read the article

  • IE7/IE8 javascript drop down menu used to redirect not working

    - by Robbiegod
    The error I see from IE7/IE8 in Jquery v1.7.2 and v.1.7.1 - i tried both: SCRIPT438: Object doesn't support property or method 'apply' My Code: <form> <select id="stateD" OnChange="showState()"> <option value="none" selected="selected">==========</option> <option value="http://www.google.com">google</option> <option value="http://www.yahoo.com">Yahoo</option> </select> </form> My Javascript - I have this pasted just below the webform: <script type="text/javascript"> function showState(){ oStates = document.getElementById("stateD"); var jLink = $("#stateD :selected").val(); if (jLink == undefined || jLink == "none" ){ alert("Please Select a State"); } else{ document.location.href=jLink}; } </script> I'm not using 2 libraries so i don't get why its having a problem. All that is supposed to happen is you select a url from the drop down menu and it auto sends you to that url that is in the value of the option tag. Works everywhere else, not sure why IE has to be such a jerk today. I'd post a url but i can't at the moment. its private. has anyone encountered this issue before?

    Read the article

  • Simple URL rewrite, not redirect, with .htaccess

    - by Ron
    I'm pretty inexperienced with .htaccess so please bear with me. I have a domain - "http://www.exampletest.com" which redirects to a folder at a different domain where I have hosting i.e: "http://www.differenturl.com/exampletest" Is there an easy mod_rewrite rule where I could have anything at "http://www.differenturl.com/exampletest" show up as "http://www.exampletest.com?" An example would be: "http://www.differenturl.com/exampletest/user.php" - "http://www.exampletest.com/user.php" Any assistance is greatly appreciated. I assume this easy so sorry to ask such a basic question. Thanks

    Read the article

  • Django admin return to page after save

    - by Thordin9
    Hi all, I have 3 pages of items listed in my django application admin. After i edit one of them (lets say it is in page 2) and save my changes, i return to page 1 of my listing. How can i make it so i return to the page the item is in? I looked into some similar questions here at stackoverflow and i believe that i need to use javascript to send a httpresponse with the location header. But how i can determine the page the item is in? any help is appreciated

    Read the article

  • window.location alternatives in JavaScript

    - by MartyIX
    What is a standardized alternative to window.location.href function? I was checking on w3schools.com that it is implemented in all major browsers so there's no problem but I'm rather curious how to do that properly. From here is the statement that the function is not standardized: https://developer.mozilla.org/en/DOM/window.location Thanks!

    Read the article

  • PHP:Wrong Login info does not redirect to the specific page

    - by sdr
    <?php include 'lib/db_conn.php'; $uid=$_REQUEST['uid']; $pass=$_REQUEST['pass']; if(($uid==NULL && $pass==NULL) ||($uid==NULL) ||($pass==NULL)) { header("location:index.php?msg=Fields can't be left blank.."); } $pass=md5($pass); $sql1="SELECT * FROM `tb_user` WHERE `email`='$uid' AND `pass`='$pass'"; $rs1=mysql_query($sql1) or die (mysql_error()); $row1=mysql_fetch_array($rs1) or die (mysql_error()); $email=$row1['email']; if($uid==$email) { session_start(); $_SESSION['id']=$row1['id']; header("location:home.php"); } else { header("location:index.php?msg=Wrong Credentials.."); } ?>

    Read the article

  • Namespaced controller redirect urls

    - by bajki
    Hello, i have probably a simple question. I have created a namespace panel with categories controller. After creating or editing a category, rails redirects me to website.com/categories/:id instead of website.com/panel/categories/:id. I've noticed that in the _form view, the @panel_categories argument of form_for() function points to /categories nor /panel/categories and that's causing this behaviour. Offcourse i can add a :url => '/panel/categories' param but i feel that it's not the best solution... Can you provide me any better solution? Thanks in advance Files: routes.rb: Photowall::Application.routes.draw do resources :photos resources :categories resources :fields resources :users, :user_sessions match 'login' => 'user_sessions#new', :as => :login match 'logout' => 'user_sessions#destroy', :as => :logout namespace :panel do root :to => "photos#index" resources :users, :photos, :categories, :fields end namespace :admin do root :to => "users#index" resources :users, :photos, :categories, :fields end end categories_controller.rb: http://pastebin.com/rWJykCCF model is the default one form: http://pastebin.com/HGmkZZHM

    Read the article

  • Redirecting a large number of URLs with htaccess or php header

    - by Peter
    I have undergone a major website overhaul and now have 5,000+ incoming links from search engines and external sites, bookmark services etc that lead to dead pages or 404 errors. A lot of the pages have corresponding "permalinks" or known replacement hierarchy/URL structure. I've started to list the main redirects with htaccess or physical files with simply a header location reidrect which is clearly not sustainable! What would be the best method to list all of the old link addresses and their corresponding new addresses with htaccess, php headers, mysql, sitemap file or is it better to have all broken links and wait for search engines etc to re-index my site? Are there any implications for having a large number of redirecting files for this temporary period until links are reset?

    Read the article

  • set up way of getting mysite.$domain

    - by jose silva
    Hi I have several domains, only one website and one databse table for each domain. example: wbesite.us - data from USA goes to database table main_usa wbesite.co.uk - data form UK goes to database table main_uk Only have one database with name of the website. Having only one website structured, and having variables like $sql="select * from main_".$countrycode." where bla..bla..., and many other variables to catch the domain extension, and so on... Now, instead of having one full website for each domain, how can set a script and wher do I put it in order to detect the domain that the user uses. In my server root do I create something like website.$domain ? Something like website OLX but for different purposes. I hope I made myself clear. Thank you.

    Read the article

  • url redirection

    - by psdesai
    Hi, I need some help with regards to the url redirection. Here is the problem. We have a website with a section as http://www.site.com/sectionxxx/index.jsp we have another domain http://www.sectionxxx.com. The task is to forward any request comming for the http://www.sectionxxx.com; direct to http://www.site.com/sectionxxx/index.jsp. Any idea? P

    Read the article

  • Symfony 2 - UrlGenerator::doGenerate is called before listener

    - by guyaloni
    I want to add to the context a parameter, so when login is called I can use it in the route (similar to _locale). I can add this piece of code in HttpUtils.php (as resetLocale), but i don't find it very clean. The reason I need it is the firewall redirection to the login controller, which I would like to have in its route a customized parameter. My problem is that my listener is called after UrlGenerator::doGenerate is called, so I get a MissingMandatoryParametersException. Here is my config.yml relevant code: services: mycompany.demobundle.listener.request: class: MyCompany\DemoBundle\RequestListener arguments: [@router, @security.context] tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest } Any idea???

    Read the article

  • Redirect to previous view and inject a javascript alert

    - by n1ck0s
    Hi all, I need to do the following: I have a textbox, which appears in every page of the site, that allows to subscribe to a newsletter. This I've done already and the user is redirected to previous view after subscription. I'd like to add a javascript alert to the page the user is returned to, something like "Thanks for subscribing". How can this be done? Thanks in advance. EDIT: Propably it's not clear from the post tags. I'm using ASP.NET MVC 2 Preview 1

    Read the article

  • How to redirect Sub domain as attribute in page with .htaccess

    - by rkaartikeyan
    I want like this Ex: http://user1.mysite.com or http://user2.mysite.com if anyone enter URL Like these on browsers it should go as bellow http://mysite.com/user.php?userName=user1 How can i solve this with .htaccess With help of Prix i solved this Issue RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC] RewriteCond %{HTTP_HOST} ^(.*)\.mysite\.com RewriteRule ^(.*)$ http://mysite.com/user.php?userName=%1 [R=301] Its working fine :) http://user1.mysite.com http://mysite.com/user.php?userName=user1 -> This one is working fine with Prix Code Now i want Like Bellow. I have tried lot but not working. So again i don't have anyway rather than ask here. I want like this http://user1.mysite.com/inbox/ http://mysite.com/inbox.php?userName=user1 And also Like this http://user1.mysite.com/message/1 http://mysite.com/view-message.php?userName=user1&messageID=1

    Read the article

  • SEO Url Redirect/Rewrite Using Database Managed Links

    - by user204245
    I have searched left and right. And i am trying to find a script or a method on how I can store links in database and use them for redirection. This is an E-commerce project and I am looking for something to manage Product and system URL from database. Something Similar like magneto dose. Basically anything after the domain say like domain.com/demo/12/my_iphone so now demo/12/my_iphone will be sent to database for querry and in databases there will be a destination URL which could be productlisting.php?searchstring=iphones so the user will see link domain.com/demo/12/my_iphone but actualy he will be seeing productlisting.php?searchstring=iphones basically demo/12/my_iphone = productlisting.php?searchstring=iphones and tomorrow if the user want to edit demo/12/my_iphone to demo/12/myiphone he can just do so using simple form which will update in the database. How can i achieve this ?

    Read the article

  • Silverlight Not Rendering On Navigation

    - by Azmath
    I'm trying to create a site that requires login. Its entirely designed in silverlight. So my first page, home.xaml loads in mysite.aspx and it basically has a login page. AFter login, the user is redirected to another page user.aspx. in that page, i've embedded another silverlight control called nav.xaml. so now when user.aspx loads it is supposed to load a silverlight control. i've programmed app.xaml.vb such that it loads nav.xaml in the rootlayout when the page requesting is user.aspx. but for some reason its not working. my app.xaml.vb code: Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup If e.InitParams.ContainsKey("ReqPage") Then If e.InitParams("ReqPage") = "userpage" Then Me.RootVisual = New Nav() End If Else Me.RootVisual = New Home() End If End Sub in IE, half of the nav.xaml is rendered. but in firefox nothing is rendered. so wats going on exactly? pls help!

    Read the article

  • Detect/Redirect core dumps (when a software crashes) on Windows

    - by ereOn
    Hi, For my work, I need to create a service that will detect an abnormal program termination and, instead of displaying a message to the user (default behavior), send the generated core dump to a remote server. I'm pretty sure this can be done, but I have absolutely no clue on where to start. Is there any API/registry settings for this ? Thank you.

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >