Archive for the Category 'cPanel'

CPanel Password Directories

Thursday, December 06th, 2007

Wordpress IconThis week I wanted to setup a protected directory on one of my personal sites. CPanel has a built-in feature for setting up password protected subdirectories via the .htaccess file, so I figured I would just use this feature to setup my protected directory. Of course, nothing ever works when you want it to and I soon found out that WordPress was preventing this from working correctly. Every time I tried to access my subdirectory I received a 404 error page from WordPress. After a couple of days of messing with the root .htaccess file, I found a solution.

Edit Root .htaccess

Edit the root .htaccess file and look for the WordPress code which is how Permalinks are created. It will look similar to this.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

You will need to add a new section above your WordPress code similar to this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/subdirectory/(.*)$
RewriteRule ^.*$ - [L]
</IfModule>

Substitute the directory you want to password protect for "subdirectory", and then see if you are now able to get your CPanel password protected directory to work.

Still Not Working!

If it still does not work, then you have another .htaccess file that has the same WordPress code. For my domain, I install the WordPress files in a subdirectory named "main", and when I inspected the root .htaccess file and the .htaccess file under main, I found the same code. The solution is to remove the WordPress code from the subdirectory in which you have the WordPress files. It should now work.

For further information on WordPress Permalinks conflicting with CPanel password protected directories see:

WebMail URL Redirect

Thursday, August 17th, 2006

One of the perks of having your own domain name is that you can setup your own email addresses for your domain. While cPanel makes it easy to manage email accounts and have access to webmail applications like Horde, it does not automatically give you a nice simple url for accessing your preferred webmail application. However, with a few extra steps you can fix this.

Step 1: Your WebMail URL

First find out what the login url is to your preferred webmail application. cPanel’s default mail path is http://www.yourdomain.com/webmail. Your web host probably provided you with the default mail url. Once you login, cPanel gives you a variety of options, usually Horde is one of your webmail options. For example the direct url for Horde is usually something like:

https://www.domain.com:2096/horde/login.php

Once you determined the webmail url you need to login into cPanel and setup a subdomain.

Step 2: Add The Subdomain

In cPanel find the Subdomains icon and select it. If you do not see a Subdomains option, then your web host does not offer this feature for your account. You may need to have the web host complete this procedure for you or upgrade your account.

In Subdomains, you will want to Add, a webmail subdomain, so that your subdomain will be webmail.domain.com. Do not add the subdomain as mail as this is most likely already being used by your web host for other reasons.

Step 3: Setup Redirection

The last step is to choose Setup Redirection for the subdomain you just added. You want to redirect the subdomain you just added to the direct url for your webmail. For example:

webmail.domain.com should redirect to https://www.domain.com:2096/horde/login.php

Note that it is best to take advantage of SSL and redirect to the https url instead of the regular http url. This provides an encrypted connection. Although most browsers will display a security warning stating that the SSL certificate does not match the domain name, the connection is still encrypted and therefore secure.

Optimize Your MySQL Databases

Monday, June 20th, 2005

Many popular PHP applications like WordPress and Textpattern, along with forum software like Invision Powerboard use MySQL databases to store their data and over time these databases require some maintenance. For example if you have deleted a lot of posts from your blog or forum recently, you might consider optimizing your database tables to improve performance.

(more…)

cPanel User Guides & Help

Monday, June 06th, 2005

If you have never used cPanel before, you might feel a little bit intimidated, but cPanel actually is the easiest control panel software to use, and this is why it is the most popular panel today in webhosting.

The following three sites cover cPanel in great detail:

cPanelGuide.net is a visual guide. This is a good site to view if you want to see what cPanel’s various screens look like and what options are offered. Note that not all hosts configure cPanel the same way, so not all options may be available or look exactly the same as this.

WebMasterStop.com has an unofficial guide that goes into detail about the various functions in cPanel. This guide offers more description of what each function does and is more helpful once you are comfortable with cPanel. You can also download the guide in zipped PDF format here: The Unofficial cPanel Guide.zip.

cPanel Documentation, the official documentation is also available online. For technical issues you should also register and join the cPanel Forums, which are helpful for when you have a specific problem.

404 Custom Error Page

Friday, May 27th, 2005

In cPanel, the Error Pages function allows you to modify the different html pages that a user will see when an error is registered on your site. The most common being the famous 404 Page Not Found error that you get when a page does not exist. This tutorial will show you how to setup a proper 404 Error page, so that visitors to your site will hopefully find what they are looking for.

(more…)

Close
Powered by ShareThis