Forum Moderators: mack

Message Too Old, No Replies

problem with my home page

cannot access my home page through my domain

         

deadlyminds

1:05 pm on Dec 28, 2005 (gmt 0)

10+ Year Member



I started my website about 2 months back. Was working fine until yesterday that this provlem started.
I'am not able to access my website if i type in my domain name; for ex, if my site were www.goodsite.com and i type this into my browser, i get the "page cannot be displayed" error. But if i type in www.goodsite.com/index.html, it works perfectly. I posted this in some other forum and some of them suggested that having a index.php and index.html in the root directory can cause this problem.

All my pages end with a .htm extension except for the blog which has a index.php extension. However the blog resides within the public_html directory and works fine as well. I deleted my pages in the public_html directory and re-uploaded all files; but still I'am getting an error when i directly type in my domain name.

Please help me as i'am losing a lot of traffic because of this

Corey Bryant

1:37 pm on Dec 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ask you hosting company to check this out. Usually index.html is one of the main pages the server checks for. They might have set something up a bit differently.

-Corey

Terabytes

2:17 pm on Dec 28, 2005 (gmt 0)

10+ Year Member



differently as in:

your default page may be:
(depending upon the hosts setup...)

index.htm
default.htm
etc...

(just some clarification....)

8-)

deadlyminds

2:21 pm on Dec 28, 2005 (gmt 0)

10+ Year Member



Thnks guys, i think the default is index.html. have put a word across to my host. till then wait and watch and hear more replies -:)

encyclo

4:44 pm on Dec 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the server is running Apache, try adding the following to a root-level .htaccess file (if no file exists, create a plain-text file called .htaccess - no extension):

DirectoryIndex index.html index.htm index.php

deadlyminds

5:35 pm on Dec 28, 2005 (gmt 0)

10+ Year Member



thanks kindly let me know where to add this in my .htaccess file. Mu htaccess file looks something like this:

----------------

# -FrontPage-

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

order deny,allow
deny from all
allow from all

order deny,allow
deny from all

AuthName www.example.com
AuthUserFile /home/me/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/me/public_html/_vti_pvt/service.grp

RewriteEngine on
RewriteCond %{HTTP_REFERER}!^http://mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://mysite.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.mysite.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://mysite.com/blog/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://mysite.com/blog$ [NC]

RedirectMatch temp ^/$ http://

[edited by: jatar_k at 6:28 pm (utc) on Dec. 28, 2005]
[edit reason] examplified url [/edit]

deadlyminds

5:45 pm on Dec 28, 2005 (gmt 0)

10+ Year Member



In the .htaccess file i added a line like this :

--------------
RedirectMatch temp ^/$ [mysite.com...]

------------------------

Now it works fine, is this ok or only a temporary solution?

jdMorgan

5:47 pm on Dec 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can put the DirectoryIndex directive anywhere in there - It doesn't matter.

You have two section of allow/deny code, and only one would ever be needed (or used). You can safely delete or comment-out the first Order/Allow/Deny section.

[Added] Use the correct DirectoryIndex method. You have just put an external 302 redirect on your home page, and that might be disastrous for your home page's search ranking. [/Added]

Jim

deadlyminds

6:01 pm on Dec 28, 2005 (gmt 0)

10+ Year Member



Sorry for my ignorance but how do i do this?

jdMorgan

6:10 pm on Dec 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



-------------

# -FrontPage-
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

DirectoryIndex index.html index.htm index.php

order deny,allow
deny from all
allow from all

AuthName www.[i]example.com[/i]
AuthUserFile /home/me/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/me/public_html/_vti_pvt/service.grp


-------------

The code that followed this section was either truncated or malformed... I'm not sure which.

Jim