PDA

View Full Version : .htaccess asking for user/password twice?


mpnev
3-28-04, 06:15 AM
I have to enter username and password twice to access a folder on my site: http://www.nevalia.com/raidcalendar

username: ubmember
password: monkey

------------------------------------------
Here's the .htaccess file (located in /raidcalendar folder):

AuthUserFile /www/m/mpnev/.htpasswd
AuthGroupFile /dev/null
AuthName "Log in to view the UB Calendar"
AuthType Basic


<Limit GET>
require user ubmember
</Limit>
---------------------------------------------
Here's the .htpasswd file (located in root directory):

user:pass ... (edited by alphadesk)
---------------------------------------------
Any guidance would be greatly appreciated!!!

stevel
3-28-04, 08:45 AM
I sure hope you don't mind exposing your username and password to the world as you just did...

You get the second prompt because you first connect to www.nevalia.com, and then redirect to nevalia.com. Because the domains are different, reauthentication is required. If you're consistent with the domain, you'll get only one prompt.

rancher
3-28-04, 09:53 AM
The double or second log in started on my site just prior to 02-29-04 (I posted then but never got a response). It had been working with one log in for months and there were no changes made on my end. Not a big deal other than annoying.....

Vanja
3-28-04, 10:31 AM
I started to experience that same problem too. It worked well before. I don't know what happened. I tried to sort things out with support but it seems they don't know what's the problem too, or act like they can't see any problem.

stevel
3-28-04, 11:06 AM
This has nothing to do with PowWeb. I suspect a browser update made it more paranoid about authentication when the domain changes by a redirect.

alphadesk
3-28-04, 11:22 AM
Make sure there is a trailing " / " in the link to the password area.

http://www.nevalia.com/raidcalendar/

And I know it should not make a difference, but it seems to stop the double login problem.

Vanja
3-28-04, 02:05 PM
Originally posted by stevel
This has nothing to do with PowWeb. I suspect a browser update made it more paranoid about authentication when the domain changes by a redirect.

I have never updated my browser.

However the additional / helped. This is very strange...

rancher
3-28-04, 06:13 PM
Thanks Alphadesk, the trailing / did make a difference. Still is strange though that it never made a difference before.
Seems there's bigger fish to fry around here, so we won't worry about that small problem.....;)

Rancher

B&T
3-28-04, 08:09 PM
The trailing slash works because when you don't use it, Apache first tries to serve up a file with that name. It does not find it and does a redirect to the directory - two attempts and two prompts. At least that is the way I understand it works.

rancher
3-28-04, 09:44 PM
B&T - yeah, but why would it work with only one request for the past umpteen months and then all of a sudden start requesting two? Not only on my site, but others as well? Not arguing, just seems like there's more it....

Rancher

B&T
3-28-04, 10:06 PM
Are you using IE6? My experience is that this does not hapen with Netscape 7.1

It seems to me the double prompts started about the same time that MS disabled (with a security patch) the ability to do direct links using the user & password in the link (http://theuser:thepassword@domain.com). So I think IE is then looking at the request, as noted in my above post, and pops the second prompt. With NS the behaviour did not change. You can still use the link with the embedded user and password.

So I think people are blaming PowWeb for a change that MS made in IE6 - it will not let that "auto link" happen, or in this case the second auto prompt.

Alma
3-29-04, 02:51 AM
No, I think it is indeed something on the powweb's side as well. I saw the similiar complains in other powweb forums. In my case, evereything was fine until today (March 28). I have a password protected directory for my customers (they pay money to get in!) and today all of a sudden I am floaded with emails from the angry customers who cannot login. You see, not everybody can figure out that they have to try twice! They fail once, and they get mad!. I tried myself and had to login twice. I NEVER upgraded my browser.

Of course adding a / at the end may help, but what about my customers who have already bookmarked the page without / ??? Also, I've already sent a tons of "welcome" emails without /. This is a serious problem for me, I may start facing chargebacks,

PLEASE PLEASE TAKE CARE OF THE PROBLEM!!!

dmbgreystreet04
3-30-04, 08:04 PM
I cant get the damn .htaccess and the .htpasswd to work....I DONT KNOW WHAT I AM DOING WRONG AND WHERE THE HELL DO THESE 2 FILES GO??? AND WHAT DOES IT MEAN TO PUT THE FILES IN THE DIRECTORY ABOVE HTDOCS....does it mean in the cgi-bin??

I AM GOIN NUTS OVER HERE NEED ASSISTANCE ASAP:mad: :mad: :confused: :mad: :confused:

This is what I have in my .htaccess file:

AuthUserFile /www/d/dmbfan2003/.htpasswd
AuthGroupFile /dev/null
AuthName "Enter your Username and Password"
AuthType Basic

<Limit GET>
require user myusername
</Limit>


And this is what i have in my .htpasswd file:

myusername: userpassword

ALSO do i call these files index.htaccess and index.htpasswd or can i label it anything.htaccess and anything.htpasswd

I AM GOIN OUT OF MY SKULL HERE....WHAT DO I DO????

stevel
3-30-04, 08:11 PM
.htaccess goes in htdocs, if you want to protect your whole site. If it is to protect one folder (and its subfolders), put it in that folder.

.htpasswd should go in the top-level folder you see when you connect by FTP (the one that has htdocs and cgi-bin in it.) Make sure that the path to the .htpasswd file is correct. .htpasswd must not be in any folder that is accessible by a web browser.

The mistake most people make is the syntax of the "require" line. The tutorials aren't as clear as they could be.

Usually what you want is:

require valid-user

This will allow any user listed in .htpasswd. If you want to restrict to a specific user (say, you have different parts of the site with different access needs), use:

require user username

where "username" is the username you want to select.

dmbgreystreet04
3-30-04, 08:22 PM
This is what I have in my .htaccess file:

AuthUserFile /www/d/dmbfan2003/.htpasswd
AuthGroupFile /dev/null
AuthName "Enter your Username and Password"
AuthType Basic

<Limit GET>
require user myusername
</Limit>


And this is what i have in my .htpasswd file:

myusername: userpassword

ALSO do i call these files index.htaccess and index.htpasswd or can i label it anything.htaccess and anything.htpasswd

I AM GOIN OUT OF MY SKULL HERE....WHAT DO I DO????

tbonekkt
3-30-04, 08:33 PM
Originally posted by dmbgreystreet04
And this is what i have in my .htpasswd file:

myusername: userpassword Is the password encrypted?Originally posted by dmbgreystreet04
ALSO do i call these files index.htaccess and index.htpasswd or can i label it anything.htaccess and anything.htpasswdNo - they need to be named:

.htaccess
.htpasswd

dmbgreystreet04
3-30-04, 08:57 PM
the password is not encrypted and its not accepting the password i put in....i defined what i wanted the password to be and its not accepting it

HELP ME SOMEBODY

tbonekkt
3-30-04, 08:59 PM
Encrypt the password: http://help.powweb.com/cgi-bin/crypt.cgi

dmbgreystreet04
3-30-04, 09:16 PM
AAAHHH THANK YOU ALL VERY MUCH:D :D

snowmaker
3-31-04, 12:29 AM
Originally posted by dmbgreystreet04
I cant get the damn .htaccess and the .htpasswd to work....I DONT KNOW WHAT I AM DOING WRONG AND WHERE THE HELL DO THESE 2 FILES GO??? AND WHAT DOES IT MEAN TO PUT THE FILES IN THE DIRECTORY ABOVE HTDOCS....does it mean in the cgi-bin??

I AM GOIN NUTS OVER HERE NEED ASSISTANCE ASAP:mad: :mad: :confused: :mad: :confused:

I AM GOIN OUT OF MY SKULL HERE....WHAT DO I DO????
http://help.powweb.com/tutorials/htaccess/passprotect.php

B&T
3-31-04, 04:59 PM
Above htdocs means at the same level when looking with ftp - not inside. If you are in your ftp program you should see:

htdocs
cgi-bin
etc
.htpasswd

Alll at the same level.

Ironcleaver
3-31-04, 05:47 PM
Mpnev, remove the double carrage return between "AuthType Basic" and "<Limit Get>", with only one space it will only ask you once.. It's a little odd but it just worked for my site.. and now it only asks me once..


Originally posted by mpnev
I have to enter username and password twice to access a folder on my site:
-------
AuthUserFile /www/m/mpnev/.htpasswd
AuthGroupFile /dev/null
AuthName "Log in to view the UB Calendar"
AuthType Basic


<Limit GET>
require user ubmember
</Limit>
---------------------------------------------


(note: I dont use the trailing " / " and it still only asks once)

~

Vanja
4-4-04, 08:10 AM
Originally posted by Ironcleaver
Mpnev, remove the double carrage return between "AuthType Basic" and "<Limit Get>", with only one space it will only ask you once.. It's a little odd but it just worked for my site.. and now it only asks me once..





(note: I dont use the trailing " / " and it still only asks once)

~

tried your theory... not working... I still get 2 logins...

Croc Hunter
4-4-04, 08:37 AM
Vanja: did you try this

<Limit GET POST>
require valid-user
</Limit>

As stevel said?.

Vanja
4-4-04, 01:46 PM
Originally posted by Croc Hunter
Vanja: did you try this

<Limit GET POST>
require valid-user
</Limit>

As stevel said?.

Yes I did. I tried it with "require valid-user" and with "require user <username>". No good.

I also tried using <Limit GET> instead of <Limit GET POST> and I am still receiving double login.
I experimented with file permissions as well, but that didn't help too.

Any other ideas?

B&T
4-4-04, 02:04 PM
Aside form the double prompt issue . . .

DO NOT use <limit>

You should use something like this:

AuthUserFile /www/u/user/.htpasswd
AuthGroupFile /dev/null
AuthName "Members Only"
AuthType Basic
require valid-user

Using <limit> REDUCES the level of security to only those functions that you specify. I suspect that is not what you want to do.

Alma
4-4-04, 11:39 PM
DO NOT use <limit>

You should use something like this:

AuthUserFile /www/u/user/.htpassswd
AuthGroupFile /dev/null
AuthName "Members Only"
AuthType Basic
require valid-user


I never used <LIMIT> in the first place. My htaccess looks (and always looked) exactly as you said. Though in mine the file name is spelled ".htpasswd" (with 2 s) :) And it suddenly started asking for a second prompt.

Also, there is another weird thing going on. My htpasswd was created (encrypted) on another host, before I moved my site to powweb. Everything was working fine. But several days ago all encrypted passwords that contain underscore (_) stopped working completely!! I had to re-encrypt those. Took me a while to figure out why some passwords still work while others don't.

Is it some kind of powweb's "hackers paranoia" that provokes all this "improvements"??? We should be at least warned...

Vanja
4-5-04, 05:11 AM
dropped the <limit> thing and still get double login.... :(

Ironcleaver, can you tell me what file permissions have you set to your protected folder and every folder above that?

B&T
4-5-04, 11:37 AM
As I said in my post, taking out <limit> has nothing to do with the double prompt. I have posted about the double login already in this thread.

Ironcleaver
4-5-04, 12:26 PM
Originally posted by Vanja
dropped the <limit> thing and still get double login.... :(

Ironcleaver, can you tell me what file permissions have you set to your protected folder and every folder above that?

Sadly I don't know, whatever it is, it must be set to the default permissions. I use to use Dreamweaver 4 and it would let me change the server permissions, but now in DW-mx it looks like they took that option away, or at least hid it extreamly well.

I have to run really quick, but once I find out what their set to, I'll deffenetly let yea know..


~

mpnev
4-7-04, 12:07 AM
Thanks for all the feedback! And yes - I meant to expose the username and password, so that people could try logging in... That wasn't the real folder, nor the real password that would be used and possibly not even the real domain ;)

smac1979
6-12-04, 11:40 PM
I am trying to fix this double login problem. I have a 2nd domain pointing to a subfolder which is what my .htaccess is password protecting. However, when I add the trail to my .htaccess, it goes to the index file of my other domain which is pointed to my htdocs directory. Here is what my .htaccess file looks like:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} mysite.com/
RewriteCond %{REQUEST_URI} !subfolder/
RewriteRule ^(.*)$ subfolder/$1 [L]

Any help would be appreciated. Thanks.

Vanja
6-13-04, 04:31 AM
that double login issue used to drive me nuts.. Now I got used to accessing second level dirs with a slash at the end.

Not: www.mydomain.com/webstats
But: www.mydomain.com/webstats/

gregmcc
6-13-04, 10:57 AM
This is really driving me nuts.....

Ok - I've uploaded .htpasswd to the root, and uploaded .htaccess to webstats (in ascii mode)

below is the contents of the files: (I've replaced my username with 'username' below)

.htaccess
AuthUserFile /www/u/username/.htpasswd
AuthGroupFile /dev/null
AuthName "Members Only"
AuthType Basic

.htpasswd
test:encrypted_pass

I've also tried putting a carriage return after the last line - it keeps asking me for the password after I put in the correct one. I've also tried regenerating the password.

What am I missing????

extras
6-13-04, 11:30 AM
Do you have this in your .htaccess?

require valid-user

or

require user USERNAME

smac1979
6-13-04, 11:40 AM
I am trying to fix this double login problem. I have a 2nd domain pointing to a subfolder which is what my .htaccess is password protecting. However, when I add the trail to my .htaccess, it goes to the index file of my other domain which is pointed to my htdocs directory. Here is what my .htaccess file looks like:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} mysite.com/
RewriteCond %{REQUEST_URI} !subfolder/
RewriteRule ^(.*)$ subfolder/$1 [L]

Any help would be appreciated. Thanks.

gregmcc
6-13-04, 11:42 AM
I tried putting in:
require valid-user

No luck

extras
6-13-04, 12:28 PM
"no luck" doesn't tell much about what you are getting as result.

Tell me what is really happenning in detail if you want more suggestion.

For example, if you don't get a small window to ask you the useername,password,
your .htaccess is not processed correctly for some reason, most probably.

If you are getting that small window asking again and again,
your password file is not working as expected.
Maybe the 'path' to the passwordfile is incorrect.
Maybe the password encryption is bad.
Maybe the permission is bad.

Very tiny mistake can create a problem.
So, we need to be very picky about what we do.

extras
6-13-04, 12:40 PM
I am trying to fix this double login problem. I have a 2nd domain pointing to a subfolder which is what my .htaccess is password protecting. However, when I add the trail to my .htaccess, it goes to the index file of my other domain which is pointed to my htdocs directory. Here is what my .htaccess file looks like:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} mysite.com/
RewriteCond %{REQUEST_URI} !subfolder/
RewriteRule ^(.*)$ subfolder/$1 [L]

Any help would be appreciated. Thanks.

I don't understand your problem.
Tell us more about what you want to do, what is working,
what is not working, and detailed symptoms of the failure.

I would try with RewriteRUle like this.


RewriteEngine On
RewriteBase /
#RewriteCond %{HTTP_HOST} mysite.com/ <== remove this slash, escape "."
RewriteCond %{HTTP_HOST} mysite\.com$
#RewriteCond %{REQUEST_URI} !subfolder/ <== use ^ to make the match exact
RewriteCond %{REQUEST_URI} !^subfolder/
RewriteRule ^(.*)$ subfolder/$1 [L]

gregmcc
6-13-04, 12:42 PM
OK - got it working.

I was missing "require valid-user"

before I was getting a window - I put the password in, but it kept saying the password was wrong.

Added in the above line and bingo!

Thanks

extras
6-13-04, 12:50 PM
Glad to hear it worked. :)

smac1979
6-13-04, 01:26 PM
I don't understand your problem. Tell us more about what you want to do, what is working, what is not working, and detailed symptoms of the failure



Thanks for the response, Extra. Ok, I have 2 domains pointing to my server, mysite1.com and mysite2.com. mysite1.com is pointed to my htdocs directory and mysite2.com is pointed to my subfolder directory which is what's password protected. With the htaccess, it is currectly redirecting the url mysite2.com to the subfolder. I was told to add a trailing to the part of my htaccess that is redirecting to my password protected subfolder, so that would be 'RewriteCond %{HTTP_HOST} mysite.com/'. Now, when I add that trailing, for some insane reason, it redirects me to mysite1.com. I hope this clears my previous post up. I thank you for your help.

extras
6-13-04, 01:47 PM
You should not put that trailing slash
to "RewriteCond %{HTTP_HOST}".

Maybe someone who told you was talking about
different thing.

When you don't put the trailin slash in RewriteCond,
do you still have any problem?
If not, just forget about that slash.

Also, please make your post easier to read....

smac1979
6-13-04, 02:26 PM
You should not put that trailing slash
to "RewriteCond %{HTTP_HOST}".

Maybe someone who told you was talking about
different thing.

When you don't put the trailin slash in RewriteCond,
do you still have any problem?
If not, just forget about that slash.

Also, please make your post easier to read....


Umm, yeah I am still having a problem. The whole point is to get rid of the double login problem. Also, what exactly do you mean "make my post easier to read"?

extras
6-13-04, 03:22 PM
Do you have a .htaccess with "Auth" stuff
in the "subfolder/" of yours?

Does .htaccess of /htdocs contain "Auth" stuff, too?

Do they have same REAM name (the message of
Authentication window)?


Also, what exactly do you mean "make my post easier to read"?
Your post was in one block.
No carrige return, everything glued together,
and it's harder (at least for me) to read.
No big deal.
Just I have less appetite to read when it's written like that.

smac1979
6-14-04, 01:16 PM
Do you have a .htaccess with "Auth" stuff
in the "subfolder/" of yours?

My subfolder has the following information in the .htaccess:

AuthUserFile /www/m/mysite1/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter the user name and password."
AuthType Basic
require user username

---------

My htdocs .htaccess does not contain auth commands.

Any ideas?

extras
6-14-04, 01:37 PM
First, is this known problem discussed already,
solution found, and posted or sitting in FAQ somewhere?

If not, I would like to know about the access_log
and error_log entries when you go to the URL
and asked password twice.

You can use a script like this to see the tail of the logs.


#!/bin/sh
#
# This shellscript will show you last 30 entries of error_log
# and last 100 entries from access_log.
# Upload this in ascii mode to a password protected directory
# as "logtail.cgi" or anything with ".cgi" , and set permission to 700.
# You can modify LNUM value if you prefer to see more (or less)
# (If you change, don't put any space between '=' and the number.)
#
# This can be modified very easily to take user specified number(s).
# But it is left in this promitive state for avoiding unfortunate
# accidents caused by careless modifications.
#
#

# For error_log
LNUM=30

# For access_log
LNUMA=100

echo "Content-Type: text/html

<HTML><BODY bgcolor=#f0e0c8><PRE>"

# Change "U/Username"...
# (Do not put '/' at the end.
# Do not put any space between '=' and the path.)
MPATH=/www/U/USERNAME

echo "---- error_log ---- last $LNUM lines ----"
tail "-$LNUM" "$MPATH/logs/error_log"
echo "---- access_log ---- last $LNUMA lines ----"
tail "-$LNUMA" "$MPATH/logs/access_log"

# You can remove following uptime and ps command if you prefer.
echo "---- uptime -----"
/usr/bin/uptime
echo "---- ps -----"
/bin/ps -uxww

echo "---- done ----"



Also, just to make sure, does it happen always?
I mean, are you asked "twice" your password always?

B&T
6-14-04, 05:33 PM
extras -

This topic has been discussed soooo many times in this Forum. No solution found, or even real definition of the problem. Never happens to me with either multiple domains or subdomains and subdirectories.

Some people have said it depends on the server you are on. Some (including my theory) have said it is the backslash issue. If you look for domain.com/test - Apache first tries to serve a file called test, then bouces back to treat it as a directory. But even the backslash does not seem consistent.

So go figure :confused:

extras
6-14-04, 06:10 PM
Thank you for the info, B&T.

Maybe, I did not pay attention to the problem
simply because I never had it, or never noticed.
If the auth window asked twice, I assumed
mistypting of my part...
But even when I tested without trailing slash,
I did not get the password window twice.

So, I'll wait for the log data from smac1979,
or anyone who is having this problem.
If nobody comes back with the data,
I'll just forget about it.

smac1979
6-14-04, 11:54 PM
Extra, as B&T said, The problem with logging in twice has been discussed many times on this forum. The basis of this very thread is that of a double login problem and which is why I began posting here.

I kind of think we're digging a little deeper then we need to. The backslash has seemed to fix many peoples problems, but I feel mine lies some where in the redirection in the .htaccess, as my original post states. I'll try your error log and see what comes up. Thanks again.

n8w
7-7-04, 11:26 AM
I had the same problem

when I was putting www at the beginning
example
http://www.n8w.com/clients/msn

but if you leave the www off
example
http://n8w.com/clients/msn

it will only prompt you one time for the password

fafty
7-7-04, 02:58 PM
Hi folks,

I have been reading your post, which should help solve my
problem, but...

I followed the instructions on the web page below with no
success.
http://help.powweb.com/tutorials/htaccess/passprotect.php

I placed the .htaccess file in my created folder then
placed .htpassword on directory the same level as /cgi-bin.
I encypted the user name and password first using the URL
http://help.powweb.com/cgi-bin/crypt.cgi

I encrypted the password before putting it in .htpassword
file, but when I nagivated to the URL it prompted me for the
username and password but will not allow me to log in. Is
there something I am doing wrong?

Do I enter the encrypted password or the orginal one when
prompted? Thanks

Please help, I am also tearing my hair out here. PowWeb
support pointed me to the above page, then asked me to
post here.

------------------------------------------
Here's the .htaccess file

AuthUserFile /www/t/truser/.htpasswd
AuthGroupFile /dev/null
AuthName "Enter your Username and Password"
AuthType Basic

<Limit GET>
require truser
</Limit>
---------------------------------------------

snowmaker
7-7-04, 03:08 PM
AuthUserFile /www/t/truser/.htpasswd

... the password before putting it in .htpassword
file, but when I nagivated to the URL it prompted me for the
username and password but will not allow me to log in...

Are you sure the file you have and the file you're referencing have the same filename, or is this a typo?

Do I enter the encrypted password or the orginal one when prompted?

Use the original, plaintext password. You don't need to use the <limit> instruction in the .htaccess file.

alphadesk
7-7-04, 05:45 PM
n8w

Add the trailing slash ... see if it makes a difference. It has in the past.

http://www.n8w.com/clients/msn/

fafty
7-7-04, 06:57 PM
Hi snowmaker

Thanks for replying.

I am actually using .htpasswd, it was a typo.

I have managed to login after reading several of the
post here, but as soon as I change me user name and
password it refuses to let me in. The question I want to
ask is that should the username be an existing user in the system?

The successful login was a valid user, but I used a different
password on my protected directory.

Second question is, I want to create a second prtected directory,
so can I use the same username and password as the first directory?
or do I need a completely different username & password combination
in both .htaccess & .htpasswd?

Thanks.

snowmaker
7-7-04, 09:56 PM
The question I want to
ask is that should the username be an existing user in the system?

Second question is, I want to create a second prtected directory,
so can I use the same username and password as the first directory?
or do I need a completely different username & password combination
in both .htaccess & .htpasswd?

The user just has to exist in the .htpasswd file, you don't have to create a user in OPS, if that's you meant. If you create a second directory that you want to protect, that directory should have it's own .htaccess, and it can point to the same .htpasswd as the first one. The .htpasswd file(s) should be on same level as htdocs, not in htdocs or the protected dirs. In fact, the .htpasswd file(s) don't have to be named .htpasswd, as long as the .htaccess points to the correct filename.

fafty
7-8-04, 07:28 AM
I have gone past every single thing you said. What I am after
is, do I use another user for the second protected directory?
Because it will not log me in when I use the same user.

Moreover there is something very strange, if I change the user
name and password then encryt as usual, it will not log me
on anymore why is that, very intermittent.

snowmaker
7-8-04, 12:13 PM
If both of the .htaccess files are requiring the same user (specific or valid), and both of the files point to the same .htpasswd, you shouldn't need to log into the second directory if you're logged into the first one.

fafty
7-8-04, 02:10 PM
Exactly, why is it prompting me on the second directory, when
I literaly copied the .htaccess file into the second directory.

The first directory allows me to logon alright, but the second
directory prompts me? Very strange!

Is it anything to do with chmod on the folder or what?
Please help, thanks.

snowmaker
7-8-04, 03:33 PM
Well I wish I could swim over there and do just that, but I'm stumped. I guess you could delete the .ht files you have now and start over, I've done THAT more than once. Folder permissions should be 755, and permissions on the .ht files should be 644.

mpnev
8-14-04, 04:29 PM
Wow, this thread went above and beyond, eh? :p

Well, the two most simplest of solutions here both worked for me...

1) remove www from the link

-or-

2) add / to the end of the link

Easy... Thanks all!

extras
9-8-04, 01:16 PM
Possible fix for the problem.

These code prevent default redirect of Apache when
a request to a directory does not end with trailing slash.

Transparent mode. (No more redirect)

RewriteEngine on
RewriteBase /

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^(.*[^/])$ $1/



301 redirect mode. But it retain same HOST name as the original request.
(By default, Apache dropped "www" causing some problems.)

RewriteEngine on
RewriteBase /

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*[^/])$ http://%{HTTP_HOST}/$1/ [R=301,L]



I found this thanks to this thread:
http://forum.powweb.com/showthread.php?t=40952

NMS
9-9-04, 01:15 PM
This code really solves the trailing slash problem:

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^(.*[^/])$ $1/

CONGRATULATIONS to EXTRAS :p

NMS
9-9-04, 01:54 PM
Updated Tutorial http://help.powweb.com/tutorials/htaccess/subdomain.php (thanks to extras)

extras
9-10-04, 07:47 AM
If you use Internal redirect method (The one I called transparent mode),
you may see some 404 error in your erro__log.

To avoid this, please see this post for more detail.
238019