Search Results

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

Page 35/56 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • "Authorize" attribute and 403 error page

    - by zerkms
    [Authorize] property is nice and handy MS invention, and I hope it can solve the issues I have now To be more specific: When current client isn't authenticated - [Authorize] redirects from secured action to logon page and after logon was successfull - brings user back, this is good. But when current cilent already authenticated but not authorized to run specific action - all I need is to just display my general 403 page. Is it possible without moving authorization logic within controller's body? UPD: The behavior I need in should be semantically equals to this sketch: public ActionResult DoWork() { if (!NotAuthorized()) { return RedirectToAction("403"); } return View(); } so - there should no any redirect and url should be stay the same, but contents of the page should be replaced with 403-page

    Read the article

  • PageMethods security

    - by TenaciousImpy
    Hi, I'm trying to 'AJAX-ify' my site in order to improve the UI experience. In terms of performance, I'm also trying to get rid of the UpdatePanel. I've come across a great article over at Encosia showing a way of posting using PageMethods. My question is, how secure are page methods in a production environment? Being public, can anyone create a JSON script to POST directly to the server, or are there cross-domain checks taking place? My PageMethods would also write the data into the database (after filtering). I'm using Forms Authentication in my pages and, on page load, it redirects unauthenticated users to the login page. Would the Page Methods on this page also need to check authentication if the user POSTs directly to the method, or is that authentication inherited for the entire page? (Essentially, does the entire page cycle occur even if a user has managed to post only to the PageMethod)? Thanks

    Read the article

  • Problems with mod_Rewrite

    - by Giorgi
    Hello, Originally I had following .htaccess file: php_value display_errors 1 php_value error_reporting 7 AddDefaultCharset utf-8 Options -Indexes <Files ~ ".*\.(info|tpl)$"> Order allow,deny Deny from all </Files> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L,QSA] Which triggered 500 internal server error, so I moved first two lines to the php.ini file. after that, error disappeared, but redirect is not working, it simply redirects to the empty page, error log shows: file not found also, another log shows: PHP Warning: Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp/:/usr/local/:/usr/bin) in Unknown on line 0 I tried to write in RewriteLog which triggered 500 server error again A little help? Thank you in advance P.S. cPanel 11.24.5-STABLE (Build: 38506) Apache version 2.2.15 (Unix) MySQL version 5.0.85-community PHP version 5.2.9 Operating system Linux Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.5

    Read the article

  • AJP proxy that maps internal servlet name to a different external name

    - by sakra
    Using apache2 I want to set up an AJP proxy for a Tomcat server that maps an internal servlet URL to a completely different URL externally. Currently I am using the following configurations: Apache2 configuration: <IfModule mod_proxy.c> ProxyPreserveHost on ProxyPass /external_name ajp://192.168.1.30:8009/servlet_name ProxyPassReverse /external_name ajp://192.168.1.30:8009/servlet_name </IfModule> Note that external_name and servlet_name are different. Tomcat 6 configuration: <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> This however does not work. Apache seems to forward http requests to Tomcat. However the URLs and redirects returned by Tomcat are still using the original servlet_name and Apache does not map them to external_name. Is this possible at all with AJP? If not can it be done using a plain http proxy instead?

    Read the article

  • django urlconf or .htaccess trouble

    - by Zayatzz
    Hello I am running my django project from subfolder of a website. Lets say the address where my project is meant to open from is. http://example.com/myproject/ the myproject folder is root folder for my user account. In that folder i have fcgi script that starts my project. The .htaccess file in the folder contains this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] The trouble is, that at some cases, instead of redireting user to page like http://example.com/myproject/social/someurl/ it redirects to http://example.com/social/someurl/ which does not work. What i want to know is how to fix this problem. Is this django problem and i should change it with urconf and add myproject to all urls, or should i do this with .htaccess? I found similar question, which, sadly, remains unanswered: http://stackoverflow.com/questions/2321154/how-to-write-htaccess-if-django-project-is-in-subfolder-and-subdomain Alan.

    Read the article

  • Amazon S3 Change file download name

    - by Daveo
    I have files stored on S3 with a GUID as the key name. I am using a pre signed URL to download as per S3 REST API I store the original file name in my own Database. When a user clicks to download a file from my web application I want to return their original file name, but currently all they get is a GUID. How can I achieve this? My web app is in salesforce so I do not have much control to do response.redirects all download the file to the web server then rename it due to governor limitations. Is there some HTML redirect, meta refresh, Javascript I can use? Is there some way to change the download file name for S3 (the only thing I can think of is coping the object to a new name, downloading it, then deleting it). I want to avoid creating a bucket per user as we will have a lot of users and still no guarantee each file with in each bucket will have a unique name Any other solutions?

    Read the article

  • Changing a form's action attribute in IE?

    - by Jonatan Littke
    Hey. I'm trying to set a hash value in a form's action, to keep it when the form is submitted. Firefox allows me to update the hash and redirects accordingly, but IE doesn't. I initially thought this was related to IE not allowing hash values in the action attribute at all, but it seems I can't dynamically set the action at all in IE - with a hash or not? Is that right? I'm using the following jQuery: $("#options-form").attr('action', '#' + hash); To update: <form id="options-form" action="" method="get"> (On a sidenote, this wasn't needed in Firefox, because FF appears to preserve the current hash if it was only the GET params that changed.)

    Read the article

  • Spring redirect: prefix issue

    - by Javi
    Hello, I have an application which uses Spring 3. I have a view resolver which builds my views based on a String. So in my controllers I have methods like this one. @RequestMapping(...) public String method(){ //Some proccessing return "tiles:tileName" } I need to return a RedirectView to solve the duplicate submission due to updating the page in the browser, so I have thought to use Spring redirect: prefix. The problem is that it only redirects when I user a URL alter the prefix (not with a name a resolver can understand). I wanted to do something like this: @RequestMapping(...) public String method(){ //Some proccessing return "redirect:tiles:tileName" } Is there any way to use RedirectView with the String (the resolvable view name) I get from the every controller method? Thanks

    Read the article

  • .htaccess Subfolder Redirect

    - by John K
    Hey Guys & Gals, I recently moved my WordPress website to a subfolder. I want to add a redirect in the .htaccess file so that the links to images I've uploaded originally to ~/wp-content/uploads/ will pass to ~/blog/wp-content/uploads. The .htaccess file must remain in the root folder for WordPress to read it properly. This is what I tried Redirect /wp-content/uploads/ /blog/wp-content/uploads That worked great, except I host other domains on this account, and all of the other domain's upload folders were being redirected in a similar manner. Is there a way to restrict this redirect to just one domain? So that example.com/wp-content/uploads redirects to example.com/blog/wp-content/uploads, but another.com/wp-content/uploads does not? Thanks everyone!

    Read the article

  • Is there any specific available method in jsp/Servlet API which tell you from which page the request

    - by anubhavjain86
    Hi, I have been working in Oracle iStore from past 4 months and i have been managing the application without any IDE (basically doing all the chores on notepad only because application has been designed poorly and no IDE can support it). Since the coding is done on simple notepad files it is very hard to find out the bugs in the application. I am facing a problem that i have not idea which jsp page redirect the control to which jsp page. For instance, there are two jsp pages A.jsp and other is B.jsp. Now the browser is currently displaying A.jsp. When the user click on submit button (available on A.jsp) the form submits and redirects the control to B.jsp. Now my problem is that i know i am coming on B.jsp but, i don't know that A.jsp is redirecting the control to B.jsp. Is there an method available in Servlet API which tells Which jsp is redirecting the control to B.jsp? Sorry for making you read so much long story :( appreciate ur help in advance Best Regards Anubhav

    Read the article

  • iPhone 4.0 SDK UIWebView crashes with DOMHTMLElement error..

    - by hytgbn
    My app have an UIWebView and I open a twitter oauth page with it. when I open oauth page , it works well. after I sign-in, it redirects to another page which have PIN code. and It crashes down with logs below. Is it a bug in 4.0 SDK? 2010-06-14 22:55:11.159 AllFx[1435:2003] -[DOMHTMLElement setHref:]: unrecognized selector sent to instance 0x74e4040 2010-06-14 22:55:11.162 AllFx[1435:2003] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DOMHTMLElement setHref:]: unrecognized selector sent to instance 0x74e4040' *** Call stack at first throw: ( 0 CoreFoundation 0x02b6c919 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x02cba5de objc_exception_throw + 47 2 CoreFoundation 0x02b6e42b -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3 CoreFoundation 0x02ade116 ___forwarding___ + 966 4 CoreFoundation 0x02addcd2 _CF_forwarding_prep_0 + 50 5 DataDetectorsUI 0x0bde8ac4 -[WebTextIterator(DDExtensions) dd_doUrlificationForQuery:forResults:document:DOMWasModified:URLificationBlock:] + 1731 6 DataDetectorsUI 0x0bde2f09 -[DDOperation _doURLificationOnDocument] + 341 7 DataDetectorsUI 0x0bddff9c -[DDDetectionController _doURLificationOnWebThreadAndRelease:] + 563 8 CoreFoundation 0x02add42d __invoking___ + 29 9 CoreFoundation 0x02add301 -[NSInvocation invoke] + 145 10 WebCore 0x039fa2b3 _ZL15HandleAPISourcePv + 147 11 CoreFoundation 0x02b4dd7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 12 CoreFoundation 0x02aac2cb __CFRunLoopDoSources0 + 571 13 CoreFoundation 0x02aab7c6 __CFRunLoopRun + 470 14 CoreFoundation 0x02aab280 CFRunLoopRunSpecific + 208 15 CoreFoundation 0x02aab1a1 CFRunLoopRunInMode + 97 16 WebCore 0x039943c3 _ZL12RunWebThreadPv + 483 17 libSystem.B.dylib 0x98552a19 _pthread_start + 345 18 libSystem.B.dylib 0x9855289e thread_start + 34 ) terminate called after throwing an instance of 'NSException'

    Read the article

  • Display action-specific authorisation message for [Authorize] attribute

    - by FreshCode
    Is there a way to display an action-specific authorisation message for when an [Authorize] or [Authorize(Roles="Administrator")] attribute redirects the user to the sign-in page? Ideally, [Authorize(Roles="Administrator", Message="I'm sorry Dave. I'm afraid I can't let you do that.")] public ActionResult SomeAdminFunction() { // do admin stuff return View(); } As I understand it, attributes are not meant to add functionality, but this seems purely informational. One could do this inside the action, but it seems inelegant compared to the use of an attribute. Alternatively, if (!Request.IsAuthenticated) { if (!User.IsInRole("Administrator")) SetMessage("You need to be an administrator to destroy worlds."); // write message to session stack return RedirectToAction("SignIn", "Account"); } Is there an existing way to do this or do I need to override the [Authorize] attribute?

    Read the article

  • Using multilingual and localeurl in django

    - by Dmitry A. Erokhin
    Using dajngo-multilingual and localeurl. Small sample of my main page view: def main(request): #View for http://www.mysite.com/ name = Dog.objects.all()[0].full_name #this is a translated field return render_to_response("home.html", {"name" : name}) Entering http://www.mysite.com/ redirects me to http://www.mysite.com/ru/ and "name" variable gets russian localization. For now it's ok... But... Entering http://www.mysite.com/en/ shows me same russian loclized variable. During my experiments with debuger I've discovered: request.LANGUAGE_CODE is changing properly according to /en/ or /ru/ url suffix (thanx to localeurl) invoking multilingual.languages.set_default_language() makes "name" variable change loclization The question is: should I change language of django-multilingual to request.LANGUAGE_CODE in each of my view myself, or it must be solved automaticly and I've done something wrong?

    Read the article

  • DotnetNuke redirect

    - by X-Dev
    our client needs to shortcuts to particular pages We need to redirect non existent urls like http://site.com/promotion1 to the actual URL similar to http://site.com/promotions/promotion1/tabid/799/language/en-AU/Default.aspx ... I've sent a list of appropriate DNN modules to our client but it may take them forever to get back to me. In the mean time they still submitting requests to us to create redirects for them. if there's no cost involved then i wont have to wait for them to get back to me. so I'm looking for a Quick and free way to enable the clients to set these up on this own. I've looked at: http://www.snowcovered.com/snowcovered2/Default.aspx?tabid=242&PackageID=3302 http://www.ventrian.com/Resources/Projects/FriendlyUrls.aspx http://www.codeproject.com/kb/aspnet/dnn2url_rewrite.aspx But haven't had much luck in the small amount of time i have available. Has anyone got some suggestions on how to achieve our goal with either the above resources or maybe some additional resource i haven't found yet? (DNN v4.9)

    Read the article

  • Fire Fox 3.6 - location.href not working in JSP

    - by user299873
    I have jsp page with method = POST and action='/mydir/mypage/nextpage' I have a button : < button title='Continue' onclick="this.form.perform.value='cancelButton'; javascript:doCloseWindow();" Continue < /button and java script method like: function doCloseWindow(){ location.href = "https://abc.xyz.com/mydir/?param=123"; } It does not work in fire fox 3.6. On click of button; it redirects to the path I mentioned in form action. With Tamper data I find that the request goes to URL ( as in method ) with GET and then it re-directs to form's action URL. I added return false in the method call also.-- javascript:doCloseWindow();return false" I tired various combination like window.location.href = "https://abc.xyz.com/mydir/?param=123"; window.document.location.href = "https://abc.xyz.com/mydir/?param=123"; document.location.href = "https://abc.xyz.com/mydir/?param=123"; But no success.

    Read the article

  • ASP.NET MVC SSL POST Error

    - by RyanFetz
    I have a Logon page in a MVC (1.0) application that I am securing with SSL, I have an attribute that inspects the request for the page and redirects to a https uri when it is requested with http. This all works, however when I post the form content i get the following error: The parameters dictionary contains a null entry for parameter 'rememberMe' of non-nullable type 'System.Boolean' for method 'System.Web.Mvc.ActionResult LogOn(System.String, System.String, Boolean, System.String)' in 'DAC.US.Web.Portal.Controllers.AccountController'. To make a parameter optional its type should be either a reference type or a Nullable type. Parameter name: parameters here is the controller code... // // GET: /Account/LogOn [RequiresSSL] public ActionResult LogOn(string ReturnUrl) { if (TempData["Message"] != null) ViewData["Message"] = TempData["Message"]; TempData["Message"] = null; ViewData["ReturnUrl"] = ReturnUrl ?? "/Home"; return View(); } Again, the RequireSSL Attribute works, but the POST from that SSL uri does not. What is not working?

    Read the article

  • Google search result redirecting to tinyurl4.info

    - by GaVrA
    When you google for these keywords: crtaci.info First result is my site, www.crtaci.info. Now, i have no idea what is happening, but when you click on that search result sometimes it redirects you to tinyurl4.info: I know in this image user is using IE, but both me on win7 and firefox and IE8 and my buddy on linux(and some browsers i have never heard of) both tested this and we got redirected to this site. But only once. Now when i do that again, it opens up my site. What the hell is going on? Please advise what to do! :( Maybe i should open this on serverfoult, i dont know... :( UPDATE: This only seems to be happening when you do this for the first time in your browser. Next time you do it it is ok. I have opened up chrome, which i only use for testing and did these steps: open google.com search for crtaci.info click on first result i get redirected open google.com again search for crtaci.info again it works fine now

    Read the article

  • Hide script extension

    - by Ali
    I have a html form that posts to a python script test.py. If someone tries to access the script directly, it redirects them to the form. I not using a web framework, just straight python cgi programming. My website is hosted on a shared hosting provider that allows me access to a .htaccess file. I wanted to know if there was a way to have the form post to the script and in the address bar show mydomain.com/test/ and not mydomain.com/test.py ? Thanks.

    Read the article

  • Firefox Extension needs to get cookie from PHP redirected external page.

    - by Tyler
    I am writing a firefox extension that interacts with a JSON server interface. I receive a url to the server which then redirects to the client site that provides the cookie. I need to be able to set this cookie in the users browser without physically loading it in the browser. Is this possible through an AJAX call? I tried using a hidden iframe, however firefox does not seem to like a php redirect in the iframe. My current solution is to load the site in a second tab that never gains focus and then auto close it when the cookie is set. This is very messy and would prefer something more streamlines. Any thoughts?

    Read the article

  • Forcing a page to load itself in another page's iframe

    - by bufferz
    I'm a fairly inexperienced web designer learning css/html on the fly for a company's web site. I want to keep menus, banners, etc in one document so I don't have to repeat updates across many documents. My solution was to make an index.aspx file with the menus and headers, then have a simple iframe for content. This works quite well and updates easily. the format is: www.site.com/index.aspx?page=page1.htm www.site.com/index.aspx?page=page2.htm The problem -- Google is indexing my iframe'd pages and linking to them directly: www.site.com/page1.htm www.site.com/page2.htm How can I set up redirects to page1.htm forwards to index.aspx?page=page1.htm without creating a "hall of mirrors" effect inside the original iframe?

    Read the article

  • Secondary Domain Adds Extra Folder in URL during Postbacks

    - by Joshua
    My ASP.NET Website (C#, 3.5 framework, IIS7) is hosted at GoDaddy. There are multiple sites on the account. Currently when I perform postbacks or Response.Redirects on a secondary web site, the following URL appears in the address bar: www.mywebsite.com/webfolder/default.aspx Where the "webfolder" is the sub-directory on the server where the web site is hosted (i.e. SeverRoot/webfolder). The site seems to work with or without the folder in the URL. Is there a way to remove the folder from the URLs during postback? I think I have to use URL Rewriting (which GoDaddy supports using Microsoft's Rewrite Module) but I'm not sure how.

    Read the article

  • Transparent proxying - how to pass socket to local server without modification?

    - by Luca Farber
    Hello, I have a program that listens on port 443 and then redirects to either an SSH or HTTPS local server depending on the detected protocol. The program does this by connecting to the local server and proxying all data back and forth through its own process. However, this causes the originating host on the local servers to be logged as localhost. Is there any way to pass the socket directly to the local server process (rather than just making a new TCP connection) so that the parameters of sockaddr_in (or sockaddr_in6) will be retained? Platform for this is Linux.

    Read the article

  • joomla .htaccess file rewrite rule explanation required

    - by Vivek Chandraprakash
    Hi, I'm trying to understand the following lines in joomla's .htaccess file. Can someone explain this please #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{REQUEST_URI} !^/index.php #RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] #RewriteRule (.*) index.php #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] I want to do some custom redirects for example if a url is like this example.com/subdirectory1 i want to redirect to some article. tried adding this line in the .htaccess file RewriteRule ^somepath index.php?option=com_content&view=article&id=1&Itemid=12 but for some reason the article shows the title even though it's not supposed to show. when i access using the long url string the title doesn't appear if i rewrite it appears. Please help. -Vivek

    Read the article

  • How to make a Webservice request follow a redirect?

    - by frappuccino
    My application neeeds to access a third part web service. Of late, they have introduced a load balancer, which redirects to the server. Because of this the webservice gets a 302 - Redirect error as response. In the SOAPUI, I was able to enable a property called "Follow Redirect", and because of this service followed the redirect and served by the server. Now is there a similar propety that can be turned on in the code, which would make the webservice follow the request? (The calling code is java and the webservice is in .net)

    Read the article

  • multiple partial views mvc 2

    - by nik1
    Hello World! Hi guys, I have a master page with two partial viewson it both of which submit to the AccountController. When I click Submit on either of the partial views the following happens: If I declare the partial views like Html.BeginForm("PartialAction1","Account") it redirects to that partial view on clicking submit instead bringing back the default HomeContoller Index view with validation errors. If I declare the partial view forms as Html.BeginForm() then it returns to the default index view of the home controller. But it actually fires both partial view actions inside the AccountController and thus returns validation errors for both partial views simultaneously. What I want is version 2 above with only one action firing instead of two. Am I missing, hopefully, something very simple? I hoping someone can help me or point me in the right direction. Here's the code from my master page for the partial views Html.Action("Login1","Account") Html.Action("Login2", "Account") Many Thanks!

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >