Translate

Redirect to other site using URL Rewrite Module IIS


Redirecting traffic from one website to another website can be easily done by adding a simple rule in URL Rewrite module of IIS. Let’s see how we can do this.

Source Website: http://hostname.com
Target Website: http://xyzhost.com

We will create a rewrite rule by following below steps:
1.       Open IIS Manager by typing inetmgr in Start->Run.
2.       Select the Web Site for which you want to create a rule.
3.       Click on URL Rewrite.



4.       Click on the Add Rule(s) link in Actions pane on the right-hand side.


5.        Select Blank Rule from the Add Rule(s) dialog box and click OK.



6.       Here you will define the actual rule. Enter values in following text boxes and then click on the Conditions tab.
  •      Name           :              for example “Redirect to New Url”
  •           Patterns        :              “.*”

7.       Click on the Add button to add conditions and enter values in the below text boxes. Click on OK button.
  •          Condition Input        :              “{HTTP_HOST}”
  •           Pattern                      :              “^hostname.com.*’


8.       Now click on the Action tab and do following changes. Click on the Apply link in the right page.
·         Action type       :              select ‘Redirect’ from the dropdown
·         Redirect URL   :              Type your target url ‘http;//xyzhost.com’



Your rule is created now and you can test it by browsing the source url. Once you browse your source url http://hostname.com you will be redirected to http://xyzhost.com.

Publishing in sitecore

In Sitecore publishing has very important role. When you create or edit items it is required to publish these items to see them on your website. When you publish an item it is copied from master database to web database.

Why publish?
Whenever a content editor creates new content or edit existing content it is saved in to master database and that content will not be visible on the website until it will be published (copies into web database).

Sitecore publishing modes
There are three different types of publishing mode in sitecore to publish the content. You can select the different publishing modes as per your requirement.

1)  Republish -> Publish Everything

As the name itself says, this method publishes all publishable items without comparing one by one (even though the items have not changed). This is the most expensive option if you are publishing on a big website. It is intended to be used when you are publishing to a new web database, if you are restoring a backup of the master database or similar situations.


2)  Smart Publish -> Publish differences between Source and Target Database

This publishing mode is much faster than republish. When you choose smart publish, it reads data from the target database and compares each item with the master’s version. If it find any difference in the item since it is last published. The item will be published.

3)  Incremental Publish -> Publish Only Changed Items

This is the fastest way of publishing because in this Sitecore does not have to do any comparisons to identify the changed item. Every time an item is added or modified in Sitecore, it is stored into a publishing queue table of master database. The incremental publish reads the data from the publishing queue table and update the publishing target databases. In this publishing mode only those items which have been modified are published.