Click here to Skip to main content
15,887,135 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 Title

Redirection 

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
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
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...
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 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
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...
27 Jun 2012 by Dec90
I'm no expert but you could request the referrer http header from the client.http://msdn.microsoft.com/en-us/library/system.web.httprequest.headers.aspxmay help.
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...
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.
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...
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...
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...
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).
16 Jan 2012 by MayFlyJJ
Hi all,its my first time posting a coding question.. I am getting crazy with the following case (searching the internet for a couple of days):I want to open SSH connections from c# via opening a process and running plink. All output should be collected and depending on the results the...
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!
8 Jul 2013 by salders
I've encountered the same issue. You can capture ALL of plink's command-line output by executing it through a windows shell script. eg.Set objShell = WScript.CreateObject("WScript.Shell")Set objExecObject = objShell.Exec("cmd /c C:\tools\plink -load "& WScript.Arguments(0) &" "&...
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...
4 Jul 2022 by Member 15696853
after deleting records it is not redirecting to the page I wanted instead it is showing me an error. But after going back and refresh the page the record is deleted successfully. Here is the code : - html page :
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
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 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 2014 by DamithSL
try with UrlEncodeResponse.Redirect(HttpUtility.UrlEncode(url));
17 Apr 2014 by Sanket Saxena
You need to encode/decode url.String url = "http://www.red.com#hashthatstays";string encodedURL= HttpUtility.UrlEncode(url);Response.Redirect(encodedURL);
17 Apr 2014 by Peter Leow
Refer: 1. Similar discussions[^]2. Server.URLEncode Method[^]
30 Jun 2022 by Dave Kreskowiak
In a word, "don't". Do not redirect to a PDF. That doesn't show a page but triggers a download by the browser. Users will look at that and think you just redirected them to malware. You ALWAYS make sure the user knows what is coming with the...
30 Jun 2022 by Member 15692350
I was wondering if there was a way to create a simple index.html page and redirect it to a hosted PDF based on mobile and desktop devices? My website is not up yet but i want people to at lease see the menu. So example now i have the site...
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...
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...
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[^]
12 Sep 2022 by Bill Mayheptad Ritchie
Hello coders in the house. I am a complete beginner, i saw something on thewpclub. Net and i want to implement the same on my WordPress blog. When someone click a download link, i want another browser tab to open and display a countdown timer like 15 seconds before the main download link will...
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...
12 Sep 2022 by Member 15765378
I Have this same question and i found a lot but didn’t fount the correct answer , pleeease let me know if you got any solution.
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...
27 Aug 2014 by Tejas Vaishnav
=> Do one thing, you can create some session which is only contains valid data when user has finished steps over first page.=> check that session in your second page load event, if that session is valid then allow user to access second page, other wise redirect to first page again.the...
31 May 2020 by Member 14849113
I used an html code, and the reference to the logo is linked to an image hosting site. I'm thinking because the image doesn't come from the root directory, trying to redirect the path of the image from that hosting site to my homepage will be...
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 Mar 2022 by Member 15576737
I know little about code and have been spending several hours of my spare time online reading about redirects and regex. However, I'm still confused and am unsure if I'm even trying to solve my problem correctly. When nothing is entered into the...
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...
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...
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.
16 Jun 2021 by crypto88
I need 301 redirects to parent categories via .htaccess file or via plugin in WP: /parent-category-1/item-1/ -> /parent-category-1/ /parent-category-2/item-1/ -> /parent-category-2/ /parent-category-3/item-1/ -> /parent-category-3/ ......
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...
18 Mar 2016 by Sunasara Imdadhusen
HiYou have to install URL rewrite module for IIS and then use following:
20 May 2013 by Sunil P V
How to access a 64bit registry key from 32bit built application in .NET 3.5 and lower
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.
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...
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...
22 Oct 2018 by Mr_cool
I want to manage 301,404 and other redirects. I can create a table in the sql server database (which will contain the old and new url). How to call them in the front end server when anyone hits the old URL. Solution for non-MVC preferred. Should be fast. I appreciate any help. Thanks. What I...
20 Mar 2013 by Gopinath_Rajan
Try this Response.RedirectLocation = url; Response.StatusCode = 303;For Ur Reference http://stackoverflow.com/questions/9497467/how-to-create-303-response-in-asp-net[^]
20 Mar 2013 by _Amy
So you should go for Custom Errors in ASP.NET[^]Try this: Also check Displaying a Custom Error Page (C#)[^].[Edit]Try this in your master...
20 Mar 2013 by Mohd. Mukhtar
Try below codestring url = Request.Url.ToString(); Get actual Url from Db.Add status code to the response url.Redirect user to the page.And what have you tried so for??
21 Mar 2013 by Janani Muthaiyan
I need to do Page redirection of 303 status code in asp.. When I provide the tempURL(manually generated) in browser the link has to be automatically redirected to the original URL.. I will be having DB for each tempURLs and corresponding original URL.. I need the dynamic page redirection.....
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...
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[^]
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.
20 Jan 2014 by Richard C Bishop
Well, first off, HTML is not a scripting language with functionality. You will need to use JavaScript, Classic ASP, or some other scripting language to accomplish this task. It is pretty easy in Classic ASP. You can do exactly what you want. Just do some research.
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.
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...
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]
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...
21 Dec 2021 by Member 15475112
Hi, I have been trying to convert my http web links to https using rewrite module. The redirection seems to partially work as the links are converted with https, but then the target url is not as expected. That is, the original url:...
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 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...
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...
20 Sep 2017 by Member 13420036
I had the same problem, but resolved it in the binding. In my case I had two ip addresses but only one was bound when the website was created. It was resolved by adding a second binding that featured the 2nd ip address.
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!
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...
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...
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...
1 Oct 2013 by Member 4445346
I have two seprated profile for domain.com and m.domain.com (mobile version web site) in analytics.and we using redirection in domain.com for mobile devices to redirect mobile users to m.mobile.com.so regarding to this strategy we prevent all search engine bot and crawlers( with...
1 Oct 2013 by Homero Rivera
Tryhttps://support.google.co...
11 Oct 2012 by AmitGajjar
Hi,You can even redirect your site using DNS entry from your server. That way you do not have to keep default page on your old site. just made one entry to redirect page on the new https location. If you want to redirect using your default page then you can use Response.Redirect to...
11 Oct 2012 by Mario Majčica
There are several methods to do this. Check this link:http://www.sslshopper.com/iis7-redirect-http-to-https.html[^]I think that the simplest one is setting up a custom error page. Try and let us know!Cheers
11 Oct 2012 by AshishChaudha
Try following code in global.asax //This code work only on server void Application_BeginRequest(object sender, EventArgs e) { if (HttpContext.Current.Request.Url.ToString().ToLower().Contains("http:")) { ...
29 Jan 2023 by kk2014
Hi All suppose i have two sites are https://test.com and http://test.com. Earlier, my files were on http://test.com (non-secure) now i have migrated them on https://test.com (secure). So now there are no files on http://test.com (non-secure). ...
14 May 2014 by Samer Aburabie
The article is about how to post json data to ASP.NET MVC action and be redirected to that page.
8 Apr 2019 by #realJSOP
301 redirects in asp.net - Google Search[^] In that search result, I went here: Jeff Widmer's Blog - How to 301 Permanent Redirect in ASP.NET[^] The first response might be appropriate in your case, but only you can determine that.
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...
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...
23 Mar 2012 by RaisKazi
Debug your code by using keywords debugger; or alert('something');. Something as below.success: function (data, textStatus) { if (data.redirect) { /*Using debugger */ debugger; ...
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...
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...