Page 1 of 1

Switching to Apache htaccess login

Posted: Wed 24. Mar 2010, 07:38
by ssddgreg
I would like to switch from the login.php login to apache security (using the .htaccess file) for logging at phpwcms administrator part. I would like to pass the username and password to login.php somehow, so I don't need to provide the username and password twice.

Does anyone have a hint how to do it?

Thanks!
Dejan

Re: Switching to Apache htaccess login

Posted: Wed 24. Mar 2010, 08:20
by flip-flop
Hi,

I think this will not work without very special server based scripts.
Why you donĀ“t rename your login.php? (Have a look into conf.inc.php -> $phpwcms['login.php'] = 'login.php';

Knut

Re: Switching to Apache htaccess login

Posted: Wed 24. Mar 2010, 12:30
by Heiko H.
ssddgreg wrote:I would like to switch from the login.php login to apache security (using the .htaccess file) for logging at phpwcms administrator part.
Hi,

the first problem you have is:
The phpwcms administrator part is in the same directory as the cms itself! -> You need a lot of core code hacking to separate this! Because apache security works directorywise :idea:

Next:
You need to administrate your host to use Auth MySQL, mod_auth_mysql is needed for this. -> In the best case you administrate your host by yourself, or you have a very flexible provider.
and so on... :?

Just one question: Why do you wanna do this? I can't see any advantage, but a lot of work(for nothing)!?!

Regards Heiko...

Re: Switching to Apache htaccess login

Posted: Fri 26. Mar 2010, 17:08
by ssddgreg
Thanks for your hints. Why - I don't trust PHP and MySQL so much regarding security issues.

However, Apache htaccess is also not the best one for typing in username and pwd as a string. I will move the login.php to a subfolder and add .htaccess protection on it.

Thanks again for your comments.

Dejan