Sebastiaan Janssen has stated that content deploys might not work on Umbraco Cloud if you redirect /umbraco/*
.
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@{ | |
Layout = null; | |
}<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title></title> | |
<link rel="stylesheet" href="/css/style.css" /> | |
</head> | |
<body> |
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@using System.Linq; | |
@{ | |
Layout = null; | |
Response.ContentType = "text/xml"; | |
}<?xml version='1.0' encoding='UTF-8' ?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> | |
@ListChildNodes(Umbraco.TypedContent(UmbracoContext.Current.PageId).AncestorOrSelf(1)) |
using System; | |
using System.Globalization; | |
using System.Web; | |
using Umbraco.Web.Routing; | |
using Umbraco.Core; | |
public class MultilingualContentFinder : IContentFinder | |
{ | |
public bool TryFindContent(PublishedContentRequest contentRequest) | |
{ |
using System; | |
using System.Collections.Generic; | |
using Umbraco.Web.Routing; | |
/// <summary> | |
/// MultilingualUrlProvider | |
/// </summary> | |
public class MultilingualUrlProvider : IUrlProvider | |
{ |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 --> | |
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<system.webServer xdt:Transform="InsertIfMissing"> | |
<rewrite xdt:Transform="InsertIfMissing"> | |
<rules xdt:Transform="InsertIfMissing"> | |
<rule name="HTTP to HTTPS redirect" xdt:Locator="Match(name)" xdt:Transform="RemoveAll"/> | |
<rule name="HTTP to HTTPS redirect" stopProcessing="true" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"> |
using System.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
namespace My.Umbraco.Extensions | |
{ | |
public static class ContentExtensions | |
{ | |
/// <summary> | |
/// Sets the value of a property to the PreValue ID for a given preValue. |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="CanonicalHostNameRule1"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^www\.domain\.com$" negate="true" /> | |
</conditions> |
I often create a canonical host name URL Rewrite rule for a production site so that requests redirect to a single domain -- for example from alexlindgren.com to www.alexlindgren.com. For sites hosted with Azure App Service using deployment slots, we only want the production slot to redirect, otherwise going to the staging slot will redirect you to production since each slot uses uses the same web.config. To handle this, one can just add the non production domains to the conditions as seen in this gist.
Umbraco Cloud uses SQL Azure in the cloud, but for local environments it normally pulls the data down to a
local SQL CE database using 'dark magic.' You can, however, pull down the Dev database and restore it to a
local SQL Server install. For this, use database.ps1 PowerShell script. You may need to Set-ExecutionPolicy RemoteSigned
to run the script. If you are using Windows 7, you may need to configure powershell to use .NET 4
(see http://tfl09.blogspot.com/2010/08/using-newer-versions-of-net-with.html).
In the script, set the location of the folder where you want the DB bacpac file to get saved. Once the file is saved, in SQL Server Management Studio 2014 in the Object Explorer, right click