Click here to Skip to main content
15,867,686 members
Everything / Redirection

Redirection

redirection

Great Reads

by Dan Randolph
Builds on the existing RunRemote project to run commands on a remote server.
by Ben Baron
Java source code to demonstrate Executable Integration which is a concept of integrating several distinct executables to create a single application
by ASP.NET Community
I had a problem with assembly redirection in web.config, when i wrote assembly redirection in the machine.config it worked perfectly, where as when I
by Samer Aburabie
The article is about how to post json data to ASP.NET MVC action and be redirected to that page.

Latest Articles

by Samer Aburabie
The article is about how to post json data to ASP.NET MVC action and be redirected to that page.
by ASP.NET Community
I had a problem with assembly redirection in web.config, when i wrote assembly redirection in the machine.config it worked perfectly, where as when I
by Sunil P V
How to access a 64bit registry key from 32bit built application in .NET 3.5 and lower
by Ben Baron
Java source code to demonstrate Executable Integration which is a concept of integrating several distinct executables to create a single application

All Articles

Sort by Score

Redirection 

23 Dec 2011 by Dan Randolph
Builds on the existing RunRemote project to run commands on a remote server.
20 Jan 2014 by Thomas Daniels
You can use JavaScript[^] to do that:if (!document.referrer.endsWith('index.html')){ window.location.replace('index.html');}Hope this helps.
1 Mar 2020 by Richard MacCutchan
That is nothing to do with HCI it is standard Linux shell scripting. The "2>&1" tells the shell to send all output that would normally go to stderr to stdout. The "|" (pipe symbol) says to pass all output (i.e the combined stderr and stdout) to...
31 May 2020 by phil.o
The href attribute of the a tag is what should hold the address of your homepage. Plus, you didn't close the img tag properly:
27 Feb 2011 by elad2109
Hi guys,Got 2 htaccess questions, hopefully you could help me out:1) Why do these commands don't work:RewriteRule ^(.*)\/Bing$ http://$1 [NC,L,R=301]RewriteRule ^(.*)\/Bing\/(.*)$ http://$1/$2 [NC,L,R=301]While these do work:RewriteRule ^(.*)\/Bing$ http://www.myDomain.com...
29 Mar 2011 by avigodse
First thing, if you are having single sign-on requirement for multiple portals or websites, then its always better to have Out-Proc state management design to save user sessions, at state-server or in db-server.And if you are looking for very quick fix to your problem then read...
11 Aug 2011 by TomSeemore
Hello,I am fairly new to vb.net and am now trying to create something in ASP. What I want to do is create a pageless app that would run on a server. It would detect what url a request comes from, I understand that Request.ServerVariables("HTTP_REFERER") would do the job. Then, take that...
11 Aug 2011 by Christoph Keller
Hi,For this, you can use a HttpModule which will handle every request to your page. There you can implement your functionality (check from where the user is coming, which URL he requested and so on..).Here is a Example from Microsoft (don't bother about the .net Version, as far as I see...
8 Mar 2012 by NDawg606
I'm very green to webdesign. I understand coding from over a decade ago, but not done it since and it's slowly coming back to me, but it's all different now as well. Sorry it's long but I need a very specific task.I have a weekly webcomic that when I update with a new comic, I want my...
23 Jun 2012 by Pascal Ganaye
The compiler sees the Response class not the Response property of the page.You could try to pass the page to your class. This will allow you to access 'thePage.Response'.Alternatively HttpContext.Current.Response might work.
17 Apr 2014 by Bob@work
I wasn't able to duplicate the problem using response.redirect(urlstring):Dim gotourl As Uri = New Uri("http://www.red.com#hashthatstays")Response.Redirect(gotourl.ToString)...arrives at the page http://www.red.com#hashthatstaysHowever, if the file you're linking to has a hash in...
17 Apr 2015 by Andy Lanng
There are two parts to a process run in a cmd terminal: the process and the terminal itself.When you run a command in the terminal, that command will output to a buffer. if that buffer gets full then the process waits for the buffer to be read so it can continue.The terminal reads from...
17 Apr 2015 by Andy Lanng
I want 5 start ^_^This is a whole class. It doesn't use any assemblies outside of the standard libraries. it can be made even nicer with RX for example, which allows you to turn events into IEnumberables in a much better way that I have done here.If your looking for that, search for...
6 Jan 2018 by Member 1097736
I have to restrict access to particular action in a controller and so i have created a RestrictAccess attribute which implements ActionFilterAttribute . RestrictAccess public class RestrictAccess : ActionFilterAttribute { public override void...
6 Jan 2018 by Bryian Tan
In the HandleUnauthorizedRequest method try using the following syntax and make sure you register the filter (RestrictAccess) in the FilterConfig filterContext.Result = new RedirectResult("~/Test/RedirectToError");
6 Jun 2018 by F-ES Sitecore
Try the suggestion here How to make a catch all route to handle '404 page not found' queries for ASP.NET MVC? - Stack Overflow[^]
22 Oct 2018 by MadMyche
There are a multitude of ways that redirects can be handled. The order that these are in is signifigant in the fact of how much application overhead is created, if any; the less overhead that is onvolved the more performance your website will have. 1. At the (web) server level. This would be...
8 Nov 2019 by #realJSOP
0) The delay does not go on the page where the user clicked the link - it goes on the page that has the download button. 1) To make a link open in a new tab, add target="_top" to the href. 2) You should respond to an event in order for the html to be rendered. 3) For the record, these...
8 Apr 2019 by Member 13709557
I have to redirect some old pages to new page using ASP.NET without MVC old page url: abc.com/how-to-301-permanent-redirect-in-asp-net/ new page url: abc.com/blog/301-permanent-redirect-in-asp-net/ I'd like to manage the old and new URLs in a redirect map file maybe a csv or xml. The old...
15 Jun 2010 by roma sankhla
Hello Sir When i am registering as new user each time it says that the user already exist please choose another username and emailcan u tell me how can it be solved my name is hitender Singh Sankhla and my email address is *** deleted by Henry Minute. ***
15 Jun 2010 by Henry Minute
Firstly this sort of question should be asked in Site Bugs and Suggestions[^] as the site admins monitor the questions there, might I suggest that you visit there and ask your question. :) Secondly you should be careful of posting your Email address on a public forum like this one, unless...
18 Sep 2010 by moshe.h
I'm making a call to psftp.exe from inside my C#/.net 2.0 winform app: private void FtpUpload(){ Process psftp = new Process(); psftp.StartInfo.FileName = "psftp.exe"; psftp.StartInfo.Arguments = "XXX.XXX.XXX.XXX -l username -pw password -be -b " + batchFileName...
21 Sep 2010 by E.F. Nijboer
It looks like you are doing the operation from within the main thread and therefore blocking the application messageloop. This would also mean that if the operation takes to long, you would get the message that the program isn't responding anymore. A solution is to implement some threading or...
10 Nov 2010 by Sri9797
Hi,I want to show a silverlight navigation page from a aspx page.Assume I have a ASP Website SilverlightApplication1.Web, and a project SilverlightApplication1 under a single solution. Now, from "Default.aspx" on submit button click, I want to show the hosted silverlight...
23 Nov 2010 by Thulasi Rajasekaran
Add following javascript method in your 'Default.aspx' function Show() { window.open("SampleTestPage.aspx", "Sample Window"); }br mode="hold" />Call this javascript method when you click the submit button.Use your's xap hosted file instead of...
13 Jan 2011 by TheAteist
The 'Select' action is called by XmlHttpRequest. $.ajax( { async: false, url: 'Project/Select/1' });The 'Select' action makes redirect [HttpPost] public ActionResult...
13 Jan 2011 by Manfred Rudolf Bihy
This can be explained by your request being made via AJAX. The XMLHttpRequest object doesn't react like a browser. It is only used to retrieve data from the server and then you can process that data in your javascript code. Fiddler shows that that the server response contains a redirect, but...
27 Feb 2011 by Piccadilly Yum Yum
have you tried with : (?)RewriteRule ^(.*)\/Bing$ $1 [NC,L,R=301]RewriteRule ^(.*)\/Bing\/(.*)$ $1/$2 [NC,L,R=301]
28 Mar 2011 by xenon2006
Hello,I'd like to make a redirect to another website which have a Basic Authorization (pop up asking for username and password)for me i know the authorization header content which is likeAuthorization:Basic trityrkyjhtjyrtytrtytry== , the Base64 encryption is for the...
11 Aug 2011 by TomSeemore
I will have to set about learning how to do that. It's a new idea to me. Thank you.
11 Aug 2011 by nit_singh
You can Rewrite the URL. In MVC it is done automatically using Routing and you can extend it. For ASP.Net have a look on the URl URL Rewriting in ASP.NET[^].
11 Oct 2011 by bbirajdar
Hello ExpertsI am facing a javascript issue in Safari on Mac. I have a server side redirection logic from where I am injecting a page redirect script using window.parent.location='MyPage02.aspx';This works fine in all browsers but not in Safari on Mac. Here is my code in C# for a...
9 Nov 2011 by Jamal Seyedi
try this :window.parent.location.href = 'MyPage02.aspx';or :window.parent.window.navigate('MyPage02.aspx');
16 Jan 2012 by shekhardumala
Hi Guys,I have a mvc3 application and my client has multiple domain names registered for the same website.Now what i wanted to do is when user enters a url name i have to redirect it to the sub-pages of my website.For eg.1) if i enter www.xxx-partner.com , it should take you to...
16 Jan 2012 by anushripatil
URL Rewriting in ASP.NET 2.0[^]http://pietschsoft.com/post/2005/06/29/ASPNET-20-Rewriting-URL-Paths-just-got-a-whole-lot-easier.aspx[^]
17 Jan 2012 by Sergey Alexandrovich Kryukov
You can use System.Diagnostics.Process.Start with re-directed output streams StandardOutput and StandardError, please see http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx[^].You can find a code sample with redirection here:...
17 Jan 2012 by MayFlyJJ
Hi,thanks for the suggestion. Unfortunately I was not precise with my explanation: I am using a Process with asynchronous redirection of StandardOutput and StandardError, but I have no idea how to capture the other output send to the cmd process.thanks!
24 Feb 2012 by Dreamcooled
HiI've a problem with Unrar (called as C# process).(I know there are several implementations for C#, but the most of them are buggy or they haven't the functions I need.)As soon as I redirect one of the standard streams, Unrar skips all inputs (like passwort requests) and exits. But I...
24 Feb 2012 by wizardzz
I think you should reconsider why you are doing this then:p.StartInfo.RedirectStandardInput = true;Have you tried setting to false?Update:http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.redirectstandardinput.aspx[^]Following the example here, are...
27 Feb 2012 by Dreamcooled
Well, I couldn't solve the Problem. The 7zip commandline tool has similar issues.I've modified the provided C# Wrapper for the Unrar.dll, which can be found in the download from their side. It seems as if I could customize the wrapper to my needs (as a Workaround for the Problem).
25 Mar 2012 by skypoints
pls help, it's not redirecting to a new page!The home page$(document).ready(function () { var ajaxUrl = "fetchcustomer.aspx"; $("#Logbutton").click(function () { $.ajax({ type: "POST", //GET or POST or PUT or...
27 Mar 2012 by Mellita
If i bookmark a page i would like to be in the respective page more over to another one, i will find the way from that page to refer in google to check it.
15 May 2012 by Velkumar Kannan
Hi, I have aspx page in my project. In this page i have a linkbutton, When i click this linkbutton i want to redirect to same page with differnt text in this linkbutton. Also i want to change the address of thr url depends upon the text in the linkbutton. But the page same for...
15 May 2012 by comred
As far as change in URL is concern if you use some tricks like Server.Transfer or Response.Redirect, it may help you. If you want proper mapping url then its an advance concept like URL Rewriting, where you can actually rename Url at run time.Linkbutton rename you can handle it by usingif...
15 May 2012 by deeptibansal
To show different URLs in the browser you can use the concept of URL rewriting. To change the label you can handle it programmetically.UPDATE:[SM]: Read here: URL Rewriting with ASP.NET[^]MSDN: URL Rewriting[^]
15 May 2012 by Mohamed Mitwalli
Hi , Check this linksURL Rewriting with ASP.NET[^]http://dotnetguts.blogspot.com/2008/07/url-rewriting-with-urlrewriternet.html[^]Hope it helpBest RegardsM.Mitwalli
2 Jun 2012 by Ben Baron
Java source code to demonstrate Executable Integration which is a concept of integrating several distinct executables to create a single application
22 Jun 2012 by Member 3491662
Hello,Is it not possible to use the "Response.Redirect" or the "Server.Transfer" method within a .vb class file?For an example I am using VS 2010 and I am trying to redirect the user to another asp form if he or she has a canceled account.When writing the code in a .vb class file the...
27 Jun 2012 by Mohammad Reza Valadkhani
hi everyonerecently I`ve found that some other sites redirect to my websiteas an example my site name is mysite.com but another one who has same domain like mysite.org redirects to my address , i don`t want users redirect from mentioned address to my website , i`d really appreciate if anyone...
4 Jul 2012 by arielbeck
Hello, according to this:http://www.websense.com/content/support/library/data/v76/help/Edit%20SMTP%20enc.aspx[^]i can redirect requests to a gateway server.can i instead of it sae the eml files in filesystem?thanks!
24 Jul 2012 by Prafulla Sahu
I have a page which has a LinkButton,my requirement is when i click on 'DownLoad; Linkbutton the page should redirect to another page and there my file should be download and my web page address bar should display that which page it is redirecting also my querystring value. please suggest me how...
25 Jul 2012 by Rene Bustos
You've tried to setTimeOut within the download.aspx? I mean, when do the redirect to the page Download.aspx in on_load method (codebehind) or javascript (client) of this download page, a few seconds and call again to send the page with a parameter that makes it download the file that way you can...
25 Jul 2012 by Pankaj Nikam
What you can do is to have a page where it redirects normally and you can use client side code to point to the file. In that way the browser will show the URL and the download will also be possible.
1 Aug 2012 by Prafulla Sahu
hi I am new to this .net world so find some problems sometime please help me to overcome this.I have a hyperlink and its navigate url indicates to a secure page ,and that secure page is present inside a folder.user can see this page after his/her successful login.so my requirement is when...
1 Aug 2012 by pradiprenushe
This can be done in two ways.1. When you login create session (in login page login button click)likeSession["user"]= txtUser.Text;Write below code in page which you have to make secure.Protected void Page_load(object sender,EventArgs e){if(Session["user"] ==...
8 Aug 2012 by vit01982
Hi guys,I got an htaccess question, hopefully you could help me out:When I have a querystring parameters in URL, I have to make a redirection to the same page without these parameters.Example:http://sos-med.com/en/our-offices/endokrinologiya.html?print=1&tmpl=componentmust...
9 Nov 2012 by kk2014
hi all,i am not able to redirect/login to my owa page. when i run my code below commandd windoe comes and disappears nothing happens.please seemy code belowSub main() Dim strServerName As String = "12.345.56.789" ' my owa ip Dim strPassword As String = "password" 'my...
6 May 2013 by cs101000
When I run optimization report for my webmatrix website, I get multiple issues stating:"the page contains unnecessary redirects". This is the code snippet that causes the problem: if(!WebSecurity.IsAuthenticated) { //navigate to login page ...
7 May 2013 by Gianmaria Gregori
Maybe could help the approach used in this tutorial[^]:- create a subfolder (e.g. Members);- put files you want to protect into this subfolder;- in the Members subfolder, create a file named _PageStart.cshtml. When any page in the subfolder is requested, this page runs first;- in the...
16 May 2013 by kk2014
Hi all, On login if one of my db value is true then i don't want to show a menu which is redirecting to certain page, i did it.but if someone knows page name and write direct to address bar then he/she can go to that page.so how can i do it if someone write page name to address bar but...
16 May 2013 by Mahesh Bailwal
On every page make a check whether DB value is true, if it is true then redirect to Home Page.
17 May 2013 by Mahesh Bailwal
One of the way to do this, is to use Global.asax BeginRequest event as given below or you can create Base Page and derive all the aspx pages on which you want to stop user to come directly.In load method of base page you validate user request and redirect them to home page.protected void...
17 May 2013 by kk2014
hi all,i found the solution...i code this in my master page and it worls for me.please see below code:if (System.IO.Path.GetFileName(HttpContext.Current.Request.PhysicalPath) == "test.aspx" && showWebbkg == 1){ HttpContext.Current.Response.Redirect("Home.aspx");}
15 Aug 2013 by Vipul Mehta
Hi,When user tries typing any folder from URL (www.mydomain.com/foldername), browser throws following server error "403 - Forbidden: Access is denied.". With this message, attacker can get an idea that there exists such folder name and might try attacking or exploring it. When there is any...
15 Aug 2013 by fjdiewornncalwe
Using web-config-custom-httperrors[^] as a reference, I noticed a small difference in your config from what is described there. I'm not entirely sure if it is relevant at all, but you are missing subStatusCode="-1" in your remove statement.
10 Feb 2020 by Amogh Natu
Hi all,I'm facing a really weird scenario here with my local IIS. I have hosted multiple sites in the default website in my local IIS. One of them has the login page. From the login page, I'm redirecting the user to another page that is located in another site (which is also hosted in the...
16 Sep 2013 by Zubair Alie
It seems that you have any of following scenarios running with you1- Request was arrived on the right page "Console.aspx". But inside errorHandling you received code 5 and then you redirected it to page CPLogin with querystring parameter err=5. [and while redirection your redirect URL goes...
11 Oct 2013 by ASP.NET Community
I had a problem with assembly redirection in web.config, when i wrote assembly redirection in the machine.config it worked perfectly, where as when I
21 Oct 2013 by Amogh Natu
Indeed, the problem was with the way I had hosted the sites in my application. I just removed all the sites related to my application from IIS and then hosted all of them again much more carefully. This resolved the "wrong redirect url" problem. Also, I had some tables with missing required...
25 Oct 2013 by saddam Escape
in your c++ console application use cout.flush() instead of cout
20 Nov 2013 by ravithejag
Hi,i am developing a WCF REST Service,I have a requirement in that if any error occurred while performing CRUD operations or no data present while fetching data in WCF REST services.It has to redirect to the error page and show respective error messages on the screen.Thanks and...
28 Dec 2013 by hamed1991
Before starting, I'm sorry for my bad English, because English is not my first language. However, I have a problem with Struts 2 redirecting.One part of my Struts.xml file is like this:
30 Dec 2013 by Shubhashish_Mandal
Try this....
18 Jan 2014 by Frank1982
Hi guys, I am getting an error in a routed page when I click on a link that should open another routed link, but it seems that the code makes a loop I don't understand why and where.Here the code in the global.asaxSub RegisterRoutes(ByVal routeCollection As RouteCollection) ...
19 Jan 2014 by Frank1982
I was going from search-by-typology.aspx towards article.aspx but in the article's codebihind I have got a response.redirect(search-by-typology.aspx) old style redirect and it was going back so when I have commented that row the issue disappeared.I hope this help someone else.Thank you...
20 Jan 2014 by Member 10536511
How to write an "IF" condition in html to redirect to index page "if" visitor is not coming from index page.
6 Feb 2014 by arnavut
I have IIS 7 that serving several site on it. Only one site has SSL certificate (For example: ssldomain.com). But when i visit any other site with https, IIS show me ssldomain.com.Thanks.
10 Mar 2014 by ttddssg
I want to compile a java program using batch file. Code works if the program does not need any input but creates a deadlock condition when it needs input Here is the code:public void compilefile(ref System.Windows.Controls.RichTextBox rtb,ref TabItem tabitem) { var range = new...
13 Apr 2014 by Didier Monge
I am having a problem when I try to use the response.redirect(url) and the url has the # character ... the webserver is taking out the # character plu any character that is after the #Any idea how i can handle it
17 Apr 2014 by Peter Leow
Refer: 1. Similar discussions[^]2. Server.URLEncode Method[^]
27 May 2014 by cawboy_iran
hello.can i use ".htaccess" file for redirecting and other thing in sharepoint 2010 site?If Yes tell me how?If Not Please Advice Me.Thanks
27 May 2014 by Sergey Alexandrovich Kryukov
This file, .htaccess is the Apache file, but you probably use IIS. Your purpose is not quite clear, but try to start here:http://support.microsoft.com/kb/2818415[^].See also: http://en.wikipedia.org/wiki/Rewrite_engine[^].[EDIT — after OP's clarification]There is a lot of...
27 Aug 2014 by Member 10915623
Hello guys,Let's say when I run my web application on my locahost, and the url in the broswer is like ~/Page1.If the user changes the url from "~/Page1" to "~/Page2", they will be redirected to "~/Page2".Is there any way for me to prevent this url modification? Since I need the user...
18 Mar 2016 by Nicholas Marty
I have a small question where my search fu has left me without an answer.Example situationI'm owner of the domains "example.org" and "www.example.org"I want to redirect "example.org" to "www.example.org"There already exists a website in IIS 8 that handles both domainsWhat I...
1 Apr 2015 by Member 11574780
I'm doing this: net stop wuauservthen:rename c:\windows\SoftwareDistribution SoftwareDistribution.oldand then: mklink E:\windows\SoftwareDistribution \DI'm doing `\d` in the end because otherwise it doesn't work and \d because of the same reason.and then: ...
27 Mar 2018 by Johannes Grunedal
Hi! I have a C# application which communicates with a console window (via SetForegroundWindow and sendKeys). This works great and I use that for sending commands to the console window (I also start another DOS program inside the command prompt).The PROBLEM is that I would like to read back...
26 Aug 2015 by ADS14
Hi ,I am working in Nintex Workflow, is there is any way to direct the workflow status page from list using c# code. ?Thanks in advance
5 Oct 2015 by Kiran2401
Hi Sir,I have a problem with my project. My Problem is: If a non administrator tries to access the Admin section, he should be redirected to an error page : "ErrorPage.aspx". I have created "ErrorPage.aspx"But, in my Program, Unauthenticated (Non Admin) user is redirected to Login...
9 Jan 2016 by Zaraki21
I am working on a C++ application and I am encountered a problem. See below a brief description of my application :There are two processes which work together. The main process (application A ) calls the second one (application B) which is the child of the first one.Application A :...
9 Jan 2016 by KarstenK
I would go for named pipes as desrcibed in this article.On your code: Are the apps running at the same time, or is the launcher (A) waiting for the termination of B.
18 Mar 2016 by Sunasara Imdadhusen
HiYou have to install URL rewrite module for IIS and then use following:
23 May 2017 by Member 13217455
Hi, For a client I want to do the following thing with .htaccess: domainname.com/path must redirect to sub.domainname.com/path, but only if the first page is a deleted page / 404 page. So all the existing pages must stay intact, and the deleted pages must redirect to a subdomain with the same...
27 Mar 2018 by Andy Lanng
Updated to 2017: using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; namespace ProcessWithOutput { public class ProcessWrapper : Process, IDisposable { public enum PipeType { StdOut, StdErr } public class...
6 Jun 2018 by Member 13860593
Like the title says, I want to be able to display an error page and send a 404 header while keeping the url of the page that could not be found. What would be a good approach for achieving this? What I have tried: I've looked at attribute routing bu can't seem to wrap my head around how I...
22 Oct 2018 by #realJSOP
Using a database to manage this is - well - stupid. Google will provide a wealth of alternatives, such as this one. How to automatically redirect a browser to another web page from one of your own[^]
22 Oct 2018 by #realJSOP
You could specify a custom 301 and 404 error page in the web.config, and in the code behind for that page (in the PageLoad method?), evaluate the 404 response, which should include the faulty url, and write code to redirect to the appropriate page. So, if the bad url was...
1 Mar 2019 by Member 14168150
I'm working on an MVC app that has login authentication and times out after a while of being logging in. So I want to be able to log in and go back to the page I was rather than going to a static home page. Every time I get kicked out, I do get a "Account/Login?ReturnUrl = ... " on my...
1 Mar 2019 by F-ES Sitecore
You're going nothing with the ReturnUrl param in the HttpGet. In order for that to be available in the HttpPost you'll need to store it in the form. Amend the LoginViewModel class to add a ReturnUrl property public string ReturnUrl { get; set; } Capture the url in the HttpGet method and...