Welcome to WebmasterWorld Guest from 54.167.202.184

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess and commercial servers

Looking for my "root"

     
3:00 pm on Sep 27, 2003 (gmt 0)

New User

10+ Year Member

joined:Mar 21, 2002
posts:14
votes: 0


My domain is hosted by a commercial service (Earthlink). They have it set up so that all of my pages are in a folder called "webdocs". My question is, if I want to code an .htaccess file to control access to my site, is it sufficient for me to just upload it to this "webdocs" folder, or do I need go up a level? And if I do this without consulting with Earthlink customer service (who, to my taste, are too slow) first, is there any chance that this would interfere with the overall functioning of the site.
3:21 pm on Sept 27, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 11, 2003
posts:442
votes: 0


Upload it to the same directory that holds your home page. This .htaccess file when then affect your entire site.

A .htaccess file can indeed cause a web site to not function as expected. In that case, remove the invalid .htaccess file, correct it and upload it again.

12:25 am on Sept 28, 2003 (gmt 0)

New User

10+ Year Member

joined:Mar 21, 2002
posts:14
votes: 0


marcs,

Thanks for the advice. I'm having a problem, however. When I uploaded .htaccess I immediately started getting 500 errors when trying access my site.

What I had intended to was redirect 404s to a custom page, and to ban the Internetseer bot from the page. Without access to the Apache error logs, I can't tell what I did wrong or if there's something higher up on the server interfering with this.

Here's what I wrote:


ErrorDocument 404 /404.html

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^InternetSeer.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^sitecheck.internetseer.com
RewriteRule ^.* - [F]

Any ideas?

12:55 am on Sept 29, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


epanastatis,

The code looks OK.

I can think of two possibilities:
1) You need to add "Options +FollowSymLinks" on a new line before "RewriteEngine on" -or-
2) You are not allowed to use mod_rewrite on Earthlink.

You might be able to use mod_access to ban internetseer - it might work even if mod_rewrite is not allowed.


SetEnvIf User-Agent [Ii]nternet[Ss]eer\.com getout
<Files *>
Deny from getout
</Files>

Jim
10:33 pm on Sept 29, 2003 (gmt 0)

New User

10+ Year Member

joined:Mar 21, 2002
posts:14
votes: 0


Thanks, jdMorgan! I tried your first suggestion and still got the 500 error, so I'm leaning toward the thesis that Earthlink doesn't allow mod_rewrite (though as expected they haven't answered my question about that...) I'm testing your second suggestion, and it hasn't had any negative repercussions, but it'll take me a couple days to see if it's successfully repulsing Internetseer.

As usual, WebmasterWorld has proven to be very valuable.

2:09 am on Sept 30, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Aug 20, 2003
posts:255
votes: 0


it'll take me a couple days to see if it's successfully repulsing Internetseer

Or you could just use Wannabrowser and see right now. :)

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members