I usually use SPUtility.Redirect when working with Application Pages or pages that need to potentially look at the source querystring or go back to settings.aspx.
If I am doing a redirect other times (usually in an HttpModule), I will use the Context.Response.Redirect or HttpContext.Current.Response.Redirect. The Page.Response.Redirect is just exposing the ...
It could be achieved with HTTP Redirect in IIS using IIS URL Rewrite module. This module allows to create various rule actions including redirect and request abort.
For your scenario i recommend this option because this should redirect the request faster as the redirection happens as soon as the HTTP request received by IIS.
Let's describe ...
The difference between SPUtility.Redirect and Page.Response.Redirect is that SPUtility.Redirect provides many more options while redirecting. SPUtility.Redirect takes in the SPRedirectFlags enumeration as one of the parameters which gives us more control over the redirection. With it we can even keep the reference of the previous page.
More details on the ...
You can use different ContentEditor (Script) WebParts for Each Group, set the Target Audience on each WebPart to match your groups.
Inside each Webpart add a script which sets a global _MyGroupName variable
Add a ContentEditor Webpart at the bottom of the page which executes code for everyone
You can use a standard HTML redirect with a wait period of 0:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta http-equiv="REFRESH" content="0;url=http://www.yoururl.com">
Changing the ...
There are some online-tipps which recommend the use of the IIS Rewrite module. I do not prefer this way.
My preferred way is done with SharePoint AAMs and IIS-Bindings:
Alternate Access Mappings: Configure your HTTPS URL in Default-Zone. Add an additional "Internal URL" and map it to the "Default" Zone. Should look like this:
Add both the HTTP and the ...
There's an answer on technet which explains it pretty well:
When request is being redirected, the HttpResponse.End() method
is called. The given method, in turn, calls
The Thread.Abort method raises ThreadAbortException in the thread where it is invoked ...
You should be able to use the app_offline.htm method. Create a file called "app_offline.htm" and put it into the root directory
Also, it seems like some people have written features to help manage this:
Unfortunately redirecting after an item is added isn't easy.
The event receivers only allow redirecting when it's a Pre event like ItemAdding by the use of SPEventReceiverStatus.CancelWithRedirectUrl, but this cancels the adding of the item.
So in order to redirect when the add is done you have to:
Implement your logic in ItemAdding
Retrieve all the ...
window.location.href = "https://sharepointtenant.sharepoint.com/";
I am loading an infopath form inside the InfoPath Form Web Part after clicking a link from another page. I wanted to use the Source URL parameter but found it wasn't working.
Here is my solution:
var elem = document.getElementById('DialogFinalMessage');
if (elem !== null &&...
There are several ways of doing it, one of them is
Add the following code to the configuration/system.web node
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
i think what your refering to is Minimal Download Strategy feature.
Its purpose is to speed things up by loading as little resources as possible.
Minimal download strategy (MDS) is new web technology used in
SharePoint 2013 to save the bandwidth traffic and quick render the
pages to the clients.
MDS technique use a single .aspx page (/_Layouts/...
2. Export the page using SharePoint Designer, make changes as required and import again.
When you enable variations in your site collection, there is a file created in the pages Library called: VariationRoot.aspx. When you open this file, you will be redirected to the write site.
You have to set this page as your home page, so that everytime a user visits your site, he will be redirected to the correct site.
You can set it has homepage either ...
If changing the Source query parameter works to redirect back to the New form, why not add a script to the New form itself that rewrites the Source query param every time the form loads?
That should make it endlessly redirect back to itself.
Or, if that affects the behavior of the Cancel button also, use the PreSaveAction to rewrite the Source param, so it ...
The /_layouts/spsredirect.aspx page was created in MOSS2007 to handle upgrading pages of what was known as bucketwebs in SPS2003. It'll take the oldUrl query string and see if it matches the url of a bucketweb, if that's the case it'll try to find the url of the corresponding upgraded site and if it finds it redirect the user to it.
If you didn't create ...
You can't show a message from ItemXXXed and you can't cancel either. If you need that then you should implement ItemXXXing.
You can't cancel because the changes has already been made and you can't show a message because the UI isn't waiting for you (unless you specify synchronous, but still I don't expect SharePoint to look at Status)
please refer to this answer that i answered about the minimal download stratergy ;)
External access gives a blank home page
to stop it do the following:
Site settings > under Site Actions section > manage site feature
now disable the feature MDSFeature and it will keep on that link instead of redirecting ;)
A slightly different approach that gives you something along the lines of what you want, is to use Host Named Site Collections (HNSC).
You could create a HNSC Site Collection called http://mysubdomain.example.org and create sites below that:
You can only create HNSC using PowerShell, not GUI:
Thank you for checking my question. I have found the answer in MSDN forum.
I have get it to work. I have put one statement which disables Minimal Download Strategy.
SPContext.Current.Web.EnableMinimalDownload = false
I kept this in page load. So the time my page gets loaded it disables the effect of the SharePoint Minimal Download Strategy. The Feature ...
This can be done by specifying a Return URL in the form URL by providing a value to Source querystring. For example:
Here when a user clicks on OK button in Announcements New form, the user is redirected to deafult.aspx page rather than the AllItems.aspx page of ...
After searching over internet four hours I found one thing. That it is not possible to make alias of the url because the site collections lie within same web application. So, that way was not possible for me.
The final solution is to create an HttpModule for web application that checks specific url, if it meets the condition then redirect that request to ...
I am thinking following options. As your Site collection is HSNC base.
why not create another url, Lets say b.site.com and set that to your /sub site collection.
Move the /Sub site collection to root level using backup and restore.
lastly you can think about the Vanity URL and configured it to your IIS.check this or this