nopCommerce Redirection Issue

Discussion in 'Domain names / DNS' started by Giovanni Palmiotto, Aug 31, 2013.

  1. I just can't get the following to work! Can someone please help?
    I have 22 stores (lemira001.ca, lemira002.ca, lemira003.ca,... lemira022.ca) in nopCommerce.
    Each store is configured with its proper URL and HOSTS values.
    For example, for lemira001.ca, the configuration reads as follows:
    URL: http://lemira001.ca
    HOSTS: lemira001.ca,www.lemira001.ca

    I have nopCommerce installed at lemirawebstore.ca/store as a .NET application (using DiscountASP.Net as my provider).
    Each one of the stores (lemira001.ca, lemira002.ca, etc.) points to the domain: lemirawebstore.ca. In addition:
    To route to the specific "/store" subdirectory (which is where nopCommerce is installed), I use the IIS 8 ReWrite module. I have added a simple Redirect rule that states that when lemirawebstore.ca is hit, redirect to the "/store" subdirectory.

    ALL of this seems to work properly. My problem is the following:
    Only the FIRST store in the nopCommerce store list is being redirected to. I can't get any of the other stores to work. For example, browsing to, http://lemira017.ca, will ALWAYS activate the first store and NOT the 17th. store as specified. I know this for a fact as the name of the store, at the bottom of the page remains the same; it never changes.
    It's as if nopCommerce ignores or does not know of the original (http://lemira017.ca) request.
    It simply redirects to http://lemirawebstore.ca/store and defaults to the first store in the nopCommerce store list. I think, because of the redirects, it is losing the original HTTP_HOST header value (http://lemira017.ca).
    Is it the manner in which the stores are getting redirected to lemirawebstore.ca (and ultimately lemirawebstore.ca/store)?
    Is it the IIS Redirect rule which ultimately redirects to the "/store" subdirectory (HTTP code 301 (Permanent))?
    I've used Fiddler2 but I don't see any trace of the original request to the specific store. All I see is the final request to http://lemirawebstore.ca/store. While this makes sense, can the original HTTP_POST header values be "carried" over using the URL ReWrite module or some other solution which would not involve changing any code?
    Can anyone please shed any light on this topic?

    Best Regards,
    Giovanni
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    You need to order the Unlimited Sub-domain add-on which will give you a Unique IP and add the appropriate host header entries in IIS. It's probably failing because the host header entries are not there.
     
  3. Hi RayH,

    Can I purchase it to test it and if it doesn't work, get a refund?
     
  4. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Hi Giovanni,

    Any refund requests must be reviewed by our Billing Department. You can open up a support ticket to them to request further information.
     
  5. We already have purchased 22 domains with NamesPro.ca (domain1.ca, domain2.ca) and we're redirecting to the main domain (MainDomain.ca).
    Therefore, in addition to the already purchased domains, we must also purchase the unlimited domain name pointer? I'm kind of confused.
    Isn't the fact that we're redirecting/forwarding from Domain1.ca, Domain2, etc. to MainDomain.ca enough?
    We just lose the HTTP_HOST information.

    How would I then use my already purchased domain names with the unlimited domain name pointer from DiscountASP.Net?
     
  6. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    The Unlimited Sub-domain/Unique IP add-on will give you a Unique IP. The service is $5/month, and you can point any number of domain names to that Unique IP. It's not working because there is no host header entry in IIS. Right now, lemira017.ca appears to be pointing to this IP: 70.85.232.2. It should be pointing 96.31.33.53 which is the shared IP address of the server your account is on. That still won't work because there isn't a host header entry for lemira017.ca in IIS. If you purchase the add-on service, it will add a wildcard record to IIS so that your domain names will resolve correctly.
     
    mjp likes this.
  7. We just purchased the add-on. What's the simplest approach to accomplish what we need to do? Do we just change the IP address at our Registrar to redirect or forward to our new IP address (96.31.46.172)?
    Will this automatically put lemira017.ca in the HTTP_HOST header value?
     
  8. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Yes, just change the IP address at your Registrar to point to 96.31.46.172 (e.g. create A records that point to this IP address). The rest is already configured for you within IIS.
     
  9. I'll try to do that but I have one question:

    Since I can't find a way to install the nopCommerce application in the root, it has necessitated a rewrite to the "/store" subfolder. Is this right? Do I still need a redirect/rewrite at this point? If so, would that not change the HTTP_HOST once the rewrite/redirect is executed?
     
  10. I've erased everything from my registrar's config panel (CNAME, FWD, etc.) and just specified an A record with our new/unique IP address. Do I have to change the DNS servers at the Registrar's to those of discountasp.net as well?
     
  11. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    You should be able install nopCommerce to the root. There isn't anything preventing you from doing that. And yes, you can just add A records that point to your IP at your current registrar. Or you can just switch the name servers to us. Either works. If you switch the name servers to us, then everything should be already setup in the Control Panel.
     
  12. So.... I have uberklaus.com pointed to the DASP name servers, have ordered the unlimited IP add-in, and was hoping to resolve to a nopcommerce store at the IP currently co-located with betterthanregistries.com (96.31.36.178) according to 24x7... no such luck.

    I'm probably missing something stupid, but... help?

    I assumed the Unique IP thing made the Root Domain Pointer registration null and void, but maybe not?
     
    Last edited: Nov 1, 2013
  13. martino

    martino DiscountASP.NET Staff

    Both domain names point to the same IP number on my end. You just might need to allow some more time for the DNS propagation to be updated.

    You domain pointer also resolves to the same web site as betterthanregistries.com.

    The way our domain pointers work: By default the domain pointers will always point to the root directory of your hosting account. Since you added a Unique IP number. This Unique IP number also points to the root directory of your hosting account by default.

    I checked the DNS information for your domain pointer: uberklaus.com and it's set up correctly too.
     
    mjp likes this.
  14. Thanks Martino... I ended up buying the Domain Pointer ($15) and that did the trick. It just sounded like the Unlimited Domain/Static IP thing would have made that irrelevant, but apparently not.
     
  15. Hi, I've a domain www.abc.com and sub-domains like 1.abc.com, 2.abc.com .... Now, I don't want to index all the sub-domains in search engines. I added robots.txt and added meta robots to it but now I found that nopcommerce generated dynamic sub-domains called 1fl.abc.com, 2fl.abc.com, don't know how and why? How to stop generating such sub-domains in NopCommerce? Can anyone help? Thanks in advance.
     

Share This Page