Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

How Do You Avoid 404 Errors For Not Having An Index Page?


  • Please log in to reply
1 reply to this topic

#1 lister

lister

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 416 posts

Posted 23 July 2014 - 06:25 PM

Say that I have a directory called /fruit/ and in the /fruit/ directory exists paths like this /fruit/apples/ - and /fruit/apples/

An index.php lives in each of these -

Yes, has an index.php - /fruit/apples/
Yes, has an index.php - /fruit/oranges/
Yes, has an index.php - /fruit/pears/

Yes, has an index.php - /fruit/melons/

No, does NOT have an index.php - /fruit/

So - what is the solution here - a .htaccess file to not allow a 404 error? Nothing links to it but humans are weird and often do weird things like delete the path of a directory....

Hope that is clear!


 



#2 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 7,099 posts
  • Location:Blackpool UK

Posted 23 July 2014 - 06:57 PM

Actually without an index file present and directory browsing disabled it will be a 403 response (it is not an 'error')

 

just  add this;

ErrorDocument 403 Folder access not allowed.

to a .htaccess file in that folder (or the root .htaccess)

 

 

Then any one trying to navigate to it, will get a message of

 

Folder access not allowed.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!