I have a website hosted on web application in SharePoint 2013 with two site collections:
The website is hosted on /ar. The problem is when anyone types the domain www.domain.com into a browser it goes to the root directly rather than the /ar site collection. I tried the following two methods:
window.location = "http://domain.com/ar"
The problem in this method that the root site appears for a moment then redirects to "/ar"
I tried to backup the "/ar" site using Backup-Spsite from powershell and the restore it to the root site but i always get the following error:
Restore-SPSite : The operation that you are attempting to perform cannot be completed successfully. No content
databases in the web application were available to store your site collection. The existing content databases may
have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a
copy of this site collection. Create another content database for the Web application and then try the operation
At line:1 char:1