Forum Moderators: phranque

Message Too Old, No Replies

forwarding domain to index.htm

         

maximilion

7:17 pm on May 1, 2007 (gmt 0)

10+ Year Member



Hi, Im wondering if this is at all possible. I am using anchor tags on an index file and for some reason in safari the first time an anchor is used the page reloads but not with subsequent requests. ie

www.somdomain.com

when clicked via anchor goes to

www.somedomain.com/#anchorName

I was going to approach this by forwarding all root requests (www.somedomain.com) to the index file (www.somedomain.com/index.html)via a htaccess redirect. Is this possible? Safe to do?

thanks for your help

maximilion

8:45 pm on May 1, 2007 (gmt 0)

10+ Year Member



my post above might not be that clear, to explain further i dont want the page to reload so I was thinking of doing the redirect for all requests to the domain only.

any help is appreciated

g1smd

10:57 pm on May 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I am not fully understanding that question.

It is usual for index file requests to set a 301 redirect pointing to a URL that does not include the actual index file filename. This is to avoid any duplicate content problems.

jdMorgan

1:46 am on May 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if you are typing "http://www.somedomain.com" into your browser, or linking to that address, then it's possible that the reason you are having trouble is that that is not a valid URL -- It is missing the trailing slash. If your browser does not fix-up this error before sending the request, your server will generate a redirect to add the trailing slash, and perhaps that is causing the reload you are seeing. You should link to "http://www.somedomain.com/"

Jim