Page 1 of 1

Changing the homepage from default.aspx to /

Posted: Mon Dec 15, 2008 10:08 am
by daviddavis
Hello

How do I change the AC homepage from http://www.mysite.com/default.aspx to just http://www.mysite.com/

?

Thank you for your help in advance!

David

Re: Changing the homepage from default.aspx to /

Posted: Mon Dec 15, 2008 1:37 pm
by jmestep
If you don't type the page name into the URL and you will automatically go to the default.aspx and the page name doesn't show in the URL. Or am I not understanding?

Re: Changing the homepage from default.aspx to /

Posted: Mon Dec 15, 2008 2:04 pm
by afm
I think he is looking for a way to change the internal links to the home page from "/default.aspx" to "/". That can help with Google Page Rank (which treats / and /default.aspx as 2 separate pages).

I noticed that NavigationHelper.cs in the App_Code directory contains the string "~/Default.aspx" in several places. You could try changing all of those to "~/". I have never tried this, so you are on your own.

Re: Changing the homepage from default.aspx to /

Posted: Tue Dec 16, 2008 11:56 am
by daviddavis
Hi Judy and AFM,

Thank you both for your help! Let me try to offer a little clarification...

I see that if I go to http://www.mysite.com I stay there – I don’t go to http://www.mysite.com/default.aspx

However, if I go to mysite.com, I am taken to http://www.mysite.com/default.aspx

Since I can go to http://www.mysite.com and it works fine as we want it to (and even if I click on Home link in our AC site), I am not sure if this an Able Commerce issue, or not.

Do you know where this is controlled?

I thought it might either be in the AC administrator screen, the .htaccess file, or over at godaddy, who controls the DNS record for the mysite.com domain.

Thank you again!
-David

Re: Changing the homepage from default.aspx to /

Posted: Tue Dec 16, 2008 2:15 pm
by kastnerd
sounds like the code that changes you from mysite.com to http://www.mysite.com adds the default.aspx

Re: Changing the homepage from default.aspx to /

Posted: Tue Dec 16, 2008 2:47 pm
by daviddavis
Hi Kastnerd,

I would agree with you but where is that code?

Thanks for your help!
David

Re: Changing the homepage from default.aspx to /

Posted: Tue Dec 16, 2008 2:59 pm
by jmestep
That isn't standard Able code if that is what is doing it. If the code hasn't been customized, it would be either in your IIS settings or possibly something from GoDaddy or if you are who I think you are, a redirect from your old site?

Re: Changing the homepage from default.aspx to /

Posted: Tue Dec 16, 2008 7:44 pm
by AbleMods
daviddavis wrote:Hi Judy and AFM,

Thank you both for your help! Let me try to offer a little clarification...

I see that if I go to http://www.mysite.com I stay there – I don’t go to http://www.mysite.com/default.aspx

However, if I go to mysite.com, I am taken to http://www.mysite.com/default.aspx

Since I can go to http://www.mysite.com and it works fine as we want it to (and even if I click on Home link in our AC site), I am not sure if this an Able Commerce issue, or not.

Do you know where this is controlled?

I thought it might either be in the AC administrator screen, the .htaccess file, or over at godaddy, who controls the DNS record for the mysite.com domain.

Thank you again!
-David
The issue is due to how Able licensing works. Your site is licensed for "www.mysite.com". When the AC7 HTTP handlers see the incoming request, they check the incoming URL. If the incoming URL matches what domain the site is licensed for, IIS continues uninterrupted and masks the "/default.aspx".
If the incoming domain does not match i.e. "mysite.com", the AC7 HTTP handler redirects to "http://<licenseddomain>/Default.aspx to enforce the licensing and guarantee the home page is hit.