Jump to content

Cre8asiteforums Internet Marketing
and Conversion Web Design


Photo

Getting Traffic To Use The Index.html File


  • Please log in to reply
9 replies to this topic

#1 Anadex

Anadex

    Unlurked Energy

  • Members
  • 7 posts

Posted 13 December 2006 - 07:38 PM

Hi,

I have redirected traffic from www.anadexlabs.com to www.anadexlabs.com.au by using a .htaccess file with the following instructions:

DirectoryIndex index.html index.htm
Redirect 301 / http://www.anadexlabs.com.au/

On my .au site I have a .htaccess file with the following instructions:
DirectoryIndex index.html index.htm

I want all traffic to the .au site to use the default index.html file.
However whenever I get traffic from the .com site it always goes to index.htm on the .au site.
Both sites are on Apache servers.

How do I fix this ?

Liz

#2 joedolson

joedolson

    Eyes Like Hawk Moderator

  • Technical Administrators
  • 2902 posts

Posted 13 December 2006 - 07:45 PM

DirectoryIndex index.html index.htm

This .htaccess code is setting your preferred default index options. As you've written it, any visitor should automatically pick up index.html within a directory when they visit any directory on your site. If index.html is not present, they'll pick up index.htm. No other files will be available for default use.

The most likely reason I can think of that you'd be having problems is that you don't actually have an index.html file on your .au server - if that's the case, traffic will simply be directed to index.htm instead.

Look at the file carefully - it could look present, but have an extra extension concealed ("index.html.txt", for example) or have a typo: ("index.htmI" or "lndex.html", etc.)

If that's not the case, well...come back and we'll try again!

-Joe

#3 Anadex

Anadex

    Unlurked Energy

  • Members
  • 7 posts

Posted 13 December 2006 - 11:50 PM

Hi Joe,

The index.html file is there.
Tested by going to www.anadexlabs.com.au/index.html. It comes up.
I just cannot understand why I get www.anadexlabs.com.au/index.htm from the .com site.

Liz

#4 Ron Carnell

Ron Carnell

    Honored One Who Served Moderator Alumni

  • Invited Users For Labs
  • 2062 posts

Posted 14 December 2006 - 12:27 AM

Your redirect is the likely culprit.

Redirect 301 /* http://www.anadexlabs.com.au/*

If someone clicks on a link to old.com/index.htm they are going to be sent to new.com.au/index.htm because there's an implied * wildcard in all redirects. Your default page configured with DirectoryIndex never has a chance to kick into play.

You can test it by entering the addresses directly into your browser. Go to old.com and you should end up at new.com.au. Go to old.com/index.htm and you'll end up at new.com.au/index.htm. If those go as expected, you can be pretty sure you have a link out there somewhere with index.htm as the target.

The solution is to take index.htm out of your DirectoryIndex directive and then implement another 301 on the .au server:

Redirect 301 /index.htm http://www.anadexlabs.com.au/

Be careful! If you don't change the DirectoryIndex before you put in the new redirect, you'll very likely create an infinite loop.

#5 joedolson

joedolson

    Eyes Like Hawk Moderator

  • Technical Administrators
  • 2902 posts

Posted 14 December 2006 - 12:44 AM

Tested by going to www.anadexlabs.com.au/index.html. It comes up.


What Ron says sounds pretty much right on to me - but I do want to point out that setting your directory default won't in any way _prevent_ anybody from accessing the content at index.html. If you type in index.html explicitly - that's where you're going. The directory default is only intended to aid what you're doing when you _don't_ type in any file name at all.

Joe

#6 Anadex

Anadex

    Unlurked Energy

  • Members
  • 7 posts

Posted 14 December 2006 - 03:09 AM

Ok, I did some tests by directly typing in the following.
I have listed the results

type in www.anadexlabs.com get www.anadexlabs.com.au/index.htm
www.anadexlabs.com/index.html get www.anadexlabs.com.au/index.html
www.anadexlabs.com/index.htm get www.anadexlabs.com.au/htm

The first result is the one causing me heartache.
Maybe I can find a clue in the logs. Ron has a point in that I may not have a problem on the .au site. I probably need to find out if the .com site is redirecting to www.anadexlabs.com.au/index.htm.
I will pull up the logs and see what I can find.

Liz

#7 Lyle

Lyle

    Light Speed Member

  • Members
  • 627 posts

Posted 14 December 2006 - 08:03 AM

Why not just change the index.htm page so that all it does is redirect to index.html ?

#8 Anadex

Anadex

    Unlurked Energy

  • Members
  • 7 posts

Posted 14 December 2006 - 08:44 AM

Hi Lyle,

That is one option. However I do not want a situation where I then end up with the following result:
Type in www.anadexlabs.com and then get www.anadexlabs.com.au/index.html.
I want www.anadexlabs.com to redirect to www.anadexlabs.com.au.
Why all the fuss ?
In part due to the statistics I get from Google Analytics.
I do not want separate stats for www.anadexlabs.com.au and www.anadexlabs.com.au/index.html or index.htm.
The other issue is that I am wary of triggering duplicate content flags on search engines that may treat www.anadexlabs.com.au as a duplicate url to www.anadexlabs.com.au/index.html or index.htm.

Liz

#9 waffles

waffles

    Ready To Fly Member

  • Members
  • 19 posts

Posted 14 December 2006 - 09:38 AM

If you use a 301 redirect the user never knows they were redirected, and search engines treat it like you moved your site so there's no duplicate content penelty.

#10 Anadex

Anadex

    Unlurked Energy

  • Members
  • 7 posts

Posted 20 December 2006 - 08:23 PM

Hi,

I inserted the following line into the htaccess file:
Redirect 301 /index.htm http://www.anadexlabs.com.au

That has solved the problem. - the .com site now does not redirect to the index.htm file anymore.

Thanks for the helpful suggestions.

Regards,
Liz



RSS Feed

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users