More in this section

Forums / Bugs & Issues / Error with staging and production URL generation

Error with staging and production URL generation

4 posts, 0 answered
  1. jkregala
    jkregala avatar
    159 posts
    Registered:
    22 Sep 2009
    25 Jul 2011
    Link to this post
    Hello telerik, in order to enhance the security of our website and adhere to company Information Security rules, we have set two Sitefinity 4.1 projects for our website:

    http://intranet:8011/Sitefinity/
    - staging server, used to edit the prod website

    http://company.com/Sitefinity/
    - prod server, for public viewing, this URL is not accessible, a URL redirect was set.

    Both projects connect to a single database to ensure data is exactly the same.

    Now the problem sets in, for Pagination links, Search result links and some other link URL's generated by the widgets in prod, the port number (in our case 8011) is being hailed when in fact the port number was used only in the staging server version of the site?

    What could be the problem.

    Thanks for the kind assistance as always.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    28 Jul 2011
    Link to this post
    Hi Jkregala,

    There is a setting called "Site URL Settings" that allows changing the absolute URLs generated by Sitefinity. There are cases when Sitefinity is behind proxy or some other type of network address and port translations (e.g. NAT or PAT). In these cases the absolute URLs used for links in Sitefinity correspond to the network address of the web server and not to the real site URL. In order for the real URL to be used it has to be set via the site URL settings. These settings are situated in the Advanced Settings under SystemConfig node. There are two fields that can be set. The first one "ReplaceSiteUrl" is a Boolean field that enables/disables the replacement of the site URL. The second one "SiteUrl" defines the site URL to be used, e.g. "http://www.domain.com:80/". Places where such absolute URLs are used are the search results and the blog address in syndication feeds.

    This new setting was released with Sitefinity 4.0 SP1.

    Regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. jkregala
    jkregala avatar
    159 posts
    Registered:
    22 Sep 2009
    29 Jul 2011
    Link to this post
    Does it matter if we apply the settings on either staging or prod? Or it should be on one only?
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    03 Aug 2011
    Link to this post
    Hello Jkregala,

    Since the websites are running connected to the same database you should apply the settings on both environments. Then on the staging one you should edit the hosts file of the machine so that it does not open the production url when requested but uses the site on staging.

    Best wishes,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered