Site Is Redirecting To /default.aspx and not staying on site root?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 Jahre weitere
I have been using NopCommerce for a couple of sites, and noticed on both sites if I type in the URL such as

www.mysite.com

instead of the site showing, I get a 302 header which redirects to

www.mysite.com/default.aspx

This is a real problem for my SEO, and I need requests for the root domain to stay at the root domain - This is only happening with NopCommerce and I don't have this issue for any of my other .NET or ASP sites?

Is there a setting in Nop I am missing?  Please let me know ASAP as I need to get this resolved today.

Thanks
13 Jahre weitere
Anyone else had this??
13 Jahre weitere
Isnt URL supposed to redirect to default.aspx? If you type some other page  like ContactUs.aspx then only it will go that page.You can either set other page as start page if you want.Maybe you can clear your query properly to get it resolved.
13 Jahre weitere
Sorted this - It was a setting in the URLrewrite.config
13 Jahre weitere
To clarify, the defaultPage attribute needs to be cleared or removed:

<urlrewritingnet
   rewriteOnlyVirtualUrls="true"
   contextItemsPrefix="QueryString"
   defaultPage="default.aspx"
   defaultProvider="RegEx"
   xmlns="http://www.urlrewriting.net/schemas/config/2006/07" >
  <rewrites>
        </rewrites>
</urlrewritingnet>
13 Jahre weitere
Sorry, can you clarify your clarification?

When I delete the line
defaultPage="default.aspx"
the result is a 404 for the home page.
have I misunderstood how to do this?

because the home page is called "default.aspx" surely this is needed?
Thanks
13 Jahre weitere
You are not supposed to delete the line. Instead write the name where you get the site redirected by default.
13 Jahre weitere
rushikesh90 wrote:
You are not supposed to delete the line. Instead write the name where you get the site redirected by default.


OK, but the home page is called "default.aspx" and I do want it to go to the home page so should I re-name the home page? If so what about internal links?
13 Jahre weitere
Yes home page is named default.aspx. Actually its the ASP.NET internal function that when you type the url of a website, it gets redirected to the default page , like if you type "www.bookshelf.co.in" actually page loaded will be "bookshelf.co.in/default.aspx" , and the tiltle bar will show the title of website. Now if you are using the nopcommerce there is no need to change it anyhwere because it is already intended to be home page.
13 Jahre weitere
leen3o wrote:
I have been using NopCommerce for a couple of sites, and noticed on both sites if I type in the URL such as

www.mysite.com

instead of the site showing, I get a 302 header which redirects to

www.mysite.com/default.aspx

This is a real problem for my SEO, and I need requests for the root domain to stay at the root domain - This is only happening with NopCommerce and I don't have this issue for any of my other .NET or ASP sites?

Is there a setting in Nop I am missing?  Please let me know ASAP as I need to get this resolved today.

Thanks

So how does this change of the redirect resolve the original problem of SEO? It needs to point to default.aspx.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.