Jump to content

SSL and Custom Admin Login


MACscr

Recommended Posts

I already posted this in another thread, but i figured i would seperate it so it wouldnt get lost in the other conversations going on there and people can comment or ask for support on it here as well.

 

###################################

 

Well, I told you i would come up with a simple non branded admin login screen, so here it is.

 

Add this to your whmcs install root directory htaccess file or create a new one if you dont already have one:

 

Options FollowSymLinks
RewriteEngine On

RewriteRule ^admin/adminlogin.php$ templates/admin/login.tpl [L,NC,NS]
RedirectPermanent admin/login.php [url]https://yourdomain.com/admin/adminlogin.php[/url]

 

Make sure you customize that RedirectPermanent url to whatever you want. If you have ssl available, i recommend you use it.

 

Then create a folder in your whmcs templates folder called admin, then create a blank file called login.tpl add this html.

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>YOUR TITLE HERE</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<script type="text/javascript">
		function sf(){document.frmlogin.username.focus();}
	</script>
</head>
<body onload="sf();">
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" summary="layout table">
		<tr>
			<td colspan="2" valign="top" style="padding-top:13px;padding-bottom:13px;">
				<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="layout table">
					<tr>
						<td valign="top">
							<center>
								<form method="post" action="../../admin/dologin.php" name="frmlogin">
									Username: <input type="text" name="username" size="30" />



									Password: <input type="password" name="password" size="30" />



									<input type="submit" value="Login" class="button" />



									[url="../../admin/login.php?action=remind"]Forgotten your password? Click Here[/url]
								</form>
							</center>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>

 

Like i said, its nothing fancy, but its functional and will let you hide the the fact that its whmcs to anyone that stumbles upon your whmcs admin folder. As soon as you login, your back to the normal look of whmcs and will of course see the powered by and whm logo, etc.

 

Hope others fine this useful as I really had no need for it. =P

 

NOTE: the password reminder part is going to work with this method. I cant think of a quick fix off the top of my head and since i really have no need for this, im not going to spend any more time on it. 15 mins is enough. =P Feel free to share the solution here if you figure it out and i will update this thread.

Link to comment
Share on other sites

nice should add that to the knowledge base with the client login, always useful to have an admin login on the front page for remote workers. Maybe a bit clearer for people belowe :)

 

 

 

<form method="post" action="http://www.yourdomain.com/whmcs/admin/dologin.php?">

Email Address: <input type="text" name="username" size="50">

Password: <input type="password" name="password" size="20">

<input type="submit" value="Login">

</form>

Forgotten your password? Click Here

Link to comment
Share on other sites

why did you add ?goto=clientarea to the dologin? your html code wouldnt work if someone used the wrong username or password either. It would kick them back to login.php and they again would see whmcs info, which would defeat the purpose of my hack. My hack isnt for having a remote login form.

Link to comment
Share on other sites

?goto=clientarea was a typo forgot to remove it when I used the client template from the knowledge base :) and I was getting ready to go out for new year party. Ill edit that bit in a sec..

 

Ah yes, I was purely looking at it as a remote login form prospective rather than the concept of replacing the WHMCS page altogether.. I understand your reasoning for it, as per the discussion re: unbranding the admin area.

 

But people may find it useful to have the code avaliable todo remote admin logins...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated