views:

15

answers:

1

I am trying to create a separate subdomain for an administrator to edit their webpage, like admin.example.com

in cPanel, I created a subdirectory called admin and it automatically created a root directory under /public_html/admin. I password protected the directory and it works great. It also brings up the password prompt when I go to example.com/admin. I know its because it created the /admin directory, but is there a way to only access it through admin.example.com? I might just be picky, but I'm curious.

I'm creating a very tiny cms for a client to update a few areas on his site and was wondering whats the best way for him to access the admin/edit page? Is a password protected example.com/admin directory ok? Or is a subdomain better? Or something else?

A: 

Both example.com/admin and admin.example.com are password protected. For a tiny CMS this security is enough.

narcisradu
do you know if it's possible to create some kind of forgot password function through a password protected directory? right now, I put in an entire login page because the client specifically wanted a forgot password option and I didn't know any other way to do it then create a login page with a user database...
Ohnegott
You will not be able to implement the forgot password option directly with apache auth. For such features try to implement them in PHP.
narcisradu