Forum Moderators: bakedjake
The odd thing is that I thought cPanel was sort of controlled by some different file, higher in the directory tree.
It's NOT my username and password, as I have successfully logged in via ftp and ssh several times today.
Sometimes cPanel flakes out for no reason, and that might be all it is, but if there is something in the .htaccess that could have caused it, then I'll fix it. It's a bit long to paste here, but the contents consist of:
temporary and permanent redirects
AddHandler server-parsed .html
hotlinking protection
www --> domain
blocks by user_agent (multiple lines)
block referrer iaea.org
block no referrer, no u_a
And then this:
# ban by IP
<Files ~ ".*">
order allow,deny
allow from all
deny from env=ban
</Files>
# Cyveillance
RewriteCond %{REMOTE_ADDR} ^63\.148\.99\.2(2[4-9]¦[34][0-9]¦5[0-5])$ [OR]
RewriteCond %{REMOTE_ADDR} ^63\.226\.3[34]\. [OR]
RewriteCond %{REMOTE_ADDR} ^63\.212\.171\.161$ [OR]
# Webcontent International
RewriteCond %{REMOTE_ADDR} ^65\.102\.12\.2(2[4-9]¦3[01])$ [OR]
RewriteCond %{REMOTE_ADDR} ^65\.102\.17\.(3[2-9]¦[4-6][0-9]¦7[0-1]¦8[89]¦9[0-5]$ [OR]
the previous line exceeds a standard terminal window line length at the $ - could this be a problem?
RewriteCond %{REMOTE_ADDR} ^65\.102\.23\.1(5[2-9]¦6[0-7])$
RewriteRule .* - [F,L]
and a few deny's
If you have an "alternate domain" redirect - (what you noted as: www --> domain), make sure that it excludes your server IP address, otherwise you will have redirection problems when you try to access your site by IP address, which is often the case with various control panels:
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteCond %{HTTP_HOST} !^123\.45\.67\.89
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
Line length is not a problem; One of our august members has many (maybe all) of his UA exclusions on a single RewriteCond line.
HTH,
Jim
But it didn't work!
Clearly the problem must be somewhere else.
I've made no modifications to htpasswds or anything like that. :-/
(Plus, if that were the problem wouldn't I get a 301 error? I checked and I'm definately getting a 401 - user authentication required.)
(But my lusername and password still work for ftp and ssh!)
::sigh::
If I did this, I can't imagine how.
If they're responsible it won't be the first time, and probably not the last either . . .
> I even altered the line so 11\.22\.33\.44.* ends with a wildcard
You don't need to add a wildcard - the original line was not end-anchored.
I've seen this 401 problem myself, and basically it was my .htaccess redirecting after cPanel redirected to my IP address, and then it wanted me to log in again, etc. - sort of a big loop. The code I posted fixed it, but your problem must be different.
I can only suggest you comment out your most recent changes, and see if anything improves.
Jim
I tried commenting out various blocks. No dice. I then tried sending a blank .htaccess file. No change whatsoever.
I'm going to throw up my hands and decide it's not my fault. (After all, I made most of the major changes yesterday and had no trouble logging in then.)
Now I get to wait around for a week, for it to fix itself, or for me to get annoyed enough to actually try to get some help from my webhosts. (They rarely fix anything. If you can reach them at all, it's "why would you want that?")
Thanks for all the help, though, jdMorgan. At least I understand mod_rewrite a little bit better now . . .