Hard Coded urls in Nopcommerce

In this article we are providing information on hard coded urls in Nopcommerce for the benefit of Nopcommerce coders.

The majority of websites these days are making use of dynamic URLs. The main reason behind this is that such websites are much more easily managed by webmasters. This is more applicable to those websites that have thousands of products or pages where it is required that one can make changes in the content management portion quite effortlessly.

What are the problems caused by hard coded URLs

Hard coded URLs refer to the web page addresses that result from the search of a database driven website. Here the URL of the website runs a dynamic script such as PHP or Javascript. In contrast to this, the static urls content of the website remains the same unless some hard changes are made in the HTML code.

To put it simply, as dynamic urls are generated from specific queries to the sites database so any changes in it requires a change in the site database. The only drawback with using the dynamic urls is that these are seldom placed higher in the search engine rankings because it’s a known SEO fact that if you have your targeted keywords in the domain name or the page URL then you will surely rank high. An example of the static url and the hard coded url is given below:

Hardcoded URLs that are generated in a dynamic site look something like this:

A static URL does not have variable strings and looks something like this:

Hard Coded urls in Nopcommerce

We have implemented hard coded urls in nopcommerce websites. We did this in one such case for a client who is a supplier and servicer of high quality industrial equipment. When client first contacted us they were facing lots of issues relating to the content of the website. They advised us that the site was working on domain specific parameters. On investigating this we found that parts of the sites code contained previously set up static urls.

We resolved the hard coded urls in nopcommerce issue by implementing a centralized location on the client’s site. This was done by making some changes in the website code. Now they can easily and efficiently manage the CMS of the website.

Hard coded urls in nopcommerce

Figure 1

Please feel free to contact us if you would like any assistance on managing Nopcommerce urls.

Subscribe to Newsletter
Community poll
Do you like nopCommerce?