UnixServerAdmin

Server Administration & Management

Critical HTTP error codes

1xx Informational

This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. Since HTTP/1.0 did not define any 1xx status codes, servers must not send a 1xx response to an HTTP/1.0 client except under experimental conditions.

100 – Continue

This means that the server has received the request headers, and that the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). If the request body is large, sending it to a server when a request has already been rejected based upon inappropriate headers is inefficient. To have a server check if the request could be accepted based on the request’s headers alone, a client must send Expect: 100-continue as a header in its initial request and check if a 100 Continue status code is received in response before continuing (or receive 417 Expectation Failed and not continue).

101 – Switching Protocols

This means the requester has asked the server to switch protocols and the server is acknowledging that it will do so.

102 – Processing (WebDAV)

As a WebDAV request may contain many sub-requests involving file operations, it may take a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost.

****************************************************************************************************

2xx Success

This class of status codes indicates the action requested by the client was received, understood, accepted and processed successfully.

200 – OK

Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request the response will contain an entity describing or containing the result of the action.

201 – Created

The request has been fulfilled and resulted in a new resource being created.

202 – Accepted

The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.

203 – Non-Authoritative Information (since HTTP/1.1)

The server successfully processed the request, but is returning information that may be from another source

204 – No Content

The server successfully processed the request, but is not returning any content.

205 – Reset Content

The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.

206 – Partial Content

The server is delivering only part of the resource due to a range header sent by the client. The range header is used by tools like wget to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams.

207 – Multi-Status (WebDAV)

The message body that follows is an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.

****************************************************************************************************

3xx Redirection

This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. The action required may be carried out by the user agent without interaction with the user if and only if the method used in the second request is GET or HEAD. A user agent should not automatically redirect a request more than five times, since such re-directions usually indicate an infinite loop.

300 – Multiple Choices

Indicates multiple options for the resource that the client may follow. It, for instance, could be used to present different format options for video, list files with different extensions, or word sense disambiguation.

301 – Moved Permanently

This and all future requests should be directed to the given URI.

302 – Found

This is the most popular redirect code[citation needed], but also an example of industrial practice contradicting the standard. HTTP/1.0 specification required the client to perform a temporary redirect (the original describing phrase was “Moved Temporarily”), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviors. However, the majority of Web applications and frameworks still use the 302 status code as if it were the 303.

303 – See Other (since HTTP/1.1)

The response to the request can be found under another URI using a GET method. When received in response to a PUT, it should be assumed that the server has received the data and the redirect should be issued with a separate GET message.

304 – Not Modified

Indicates the resource has not been modified since last requested. Typically, the HTTP client provides a header like the If-Modified-Since header to provide a time against which to compare. Utilizing this saves bandwidth and reprocessing on both the server and client, as only the header data must be sent and received in comparison to the entirety of the page being re-processed by the server, then sent again using more bandwidth of the server and client.

305 – Use Proxy (since HTTP/1.1)

Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.

306 – Switch Proxy

No longer used.

307 – Temporary Redirect (since HTTP/1.1)

In this occasion, the request should be repeated with another URI, but future requests can still use the original URI. In contrast to 303, the request method should not be changed when reissuing the original request. For instance, a POST request must be repeated using another POST request.

****************************************************************************************************

4xx Client Error

The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents should display any included entity to the user. These are typically the most common error codes encountered while online.

400 – Bad Request

The request contains bad syntax or cannot be fulfilled.

401 – Unauthorized

Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource. See Basic access authentication and Digest access authentication.

402 – Payment Required

Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened, and this code is not usually used. As an example of its use, however, Apple’s MobileMe service generates a 402 error (“httpStatusCode:402” in the Mac OS X Console log) if the MobileMe account is delinquent.

403 – Forbidden

The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference.

40 4 – Not Found

The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.

405 – Method Not Allowed

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

406 – Not Acceptable

The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.

407 – Proxy Authentication Required

408 – Request Timeout

The server timed out waiting for the request. According to W3 HTTP specifications: “The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.”

409 – Conflict

Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.

410 – Gone

Indicates that the resource requested is no longer available and will not be available again. This should be used when a resource has been intentionally removed; however, it is not necessary to return this code and a 404 Not Found can be issued instead. Upon receiving a 410 status code, the client should not request the resource again in the future. Clients such as search engines should remove the resource from their indexes.

411 – Length Required

The request did not specify the length of its content, which is required by the requested resource.

412 – Precondition Failed

The server does not meet one of the preconditions that the requester put on the request.

413 – Request Entity Too Large

The request is larger than the server is willing or able to process.

414 – Request-URI Too Long

The URI provided was too long for the server to process.

415 – Unsupported Media Type

The request entity has a media type which the server or resource does not support. For example the client uploads an image as image/svg+xml, but the server requires that images use a different format.

416 – Requested Range Not Satisfiable

The client has asked for a portion of the file, but the server cannot supply that portion. For example, if the client asked for a part of the file that lies beyond the end of the file.

417 – Expectation Failed

The server cannot meet the requirements of the Expect request-header field.

418 – I’m a teapot

The HTCPCP server is a teapot. The responding entity MAY be short and stout. This code was defined as one of the traditional IETF April Fools’ jokes, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers.

421 – There are too many connections from your internet address

422 – Unprocessable Entity (WebDAV)

The request was well-formed but was unable to be followed due to semantic errors.

423 – Locked (WebDAV)

The resource that is being accessed is locked

424 – Failed Dependency (WebDAV)

The request failed due to failure of a previous request (e.g. a PROPPATCH).

425 – Unordered Collection

Defined in drafts of “WebDAV Advanced Collections Protocol”, but not present in “Web Distributed Authoring and Versioning (WebDAV) Ordered Collections Protocol”.

426 – Upgrade Required

The client should switch to a different protocol such as TLS/1.0

449 – Retry With

A Microsoft extension. The request should be retried after doing the appropriate action.

450 – Blocked by Windows Parental Controls

A Microsoft extension. This error is given when Windows Parental Controls are turned on and are blocking access to the given webpage.

****************************************************************************************************

5xx Server Error

The server failed to fulfill an apparently valid request. Response status codes beginning with the digit “5” indicate cases in which the server is aware that it has encountered an error or is otherwise incapable of performing the request. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and indicate whether it is a temporary or permanent condition. Likewise, user agents should display any included entity to the user. These response codes are applicable to any request method.

500 – Internal Server Error

A generic error message, given when no more specific message is suitable.

501 – Not Implemented

The server either does not recognize the request method, or it lacks the ability to fulfill the request.

502 – Bad Gateway

The server was acting as a gateway or proxy and received an invalid response from the upstream server.

503 – Service Unavailable

The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.

504 – Gateway Timeout

The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

505 – HTTP Version Not Supported

The server does not support the HTTP protocol version used in the request.

506 – Variant Also Negotiates

Transparent content negotiation for the request, results in a circular reference.

507 – Insufficient Storage (WebDAV)

509 – Bandwidth Limit Exceeded (Apache bw/limited extension)

This status code, while used by many servers, is not specified in any RFCs.

510 – Not Extended

Further extensions to the request are required for the server to fulfill it.

530 – User access denied

****************************************************************************************************

Advertisements

March 31, 2011 Posted by | Apache, Tips & Tricks, Unix/Linux | , , | 3 Comments

PHP Error: Cannot modify header information

The header is generally stuff that you don’t need to worry about, is generated automatically, and contains information about the page, Ucvhost web server the header must come first in the response from UCVHOST’s web server and is separated from the body by one blank line. The reason this error occurs is that some part of the body of the web page has been sent to the user already when a request is made to set a header value. Because PHP simplifies many things for you, the problem may be hiding in plain site. there are some guidelines for finding the problem:

1) Find the header() statement that is causing the problem. The error must be at or before this line.

2) Look for any statements that could send output to the user before this header statement. If you find one or more, find some way to move the header statement before them. Complex conditional statements may complicate the issue, but they may also help solve the problem. Consider a conditional expression at the top of the PHP script that determines the header value as early as possible and sets it there.

3) Make sure there is no white space outside of the php start and end tags.

March 30, 2011 Posted by | PHP | | 1 Comment

Error: Sessions directory is not writable

The temporary directory used by PHP for storing session data is not writable. It is a server issue. The directories that create via php script will assign with “NOBODY” ownership instead of your web user ownership. You have to request us to switch the ownership at server as it only can done with root access.

March 29, 2011 Posted by | PHP | | Leave a comment

What are Apache Handlers & How to setup customized Apache Handlers

Apache handlers allow you to control what Apache will do with certain file types. When Apache sees a file, it has an action built in for that file type, and will perform that action. If you wish Apache to do a different action, you will need to make a handler to tell Apache to perform that action. For example, if you use a file type that requires a special service to run it, such as a file with server side includes that is not named with a .shtml extension, you need to tell Apache to treat these files differently.

“Creating An Apache Handler”
1. Log into your cPanel.
2. Locate the Advanced menu.
3. Locate and click on the Apache Handlers icon.
4. Enter the handler you want to create in the first empty text box.
5. In the second empty text box, enter the extension the handler will use when being called.
6. Click on the “Add” button.
7. Click on the “Go Back” button to return to the Main cPanel menu.

March 28, 2011 Posted by | Apache, cPanel | , | 2 Comments

Su-PHP

Securing a server is a challenging task as it has to be secured from outside and from inside a website. Vulnerable scripts or incorrect permissions can cause compromises from inside a server. PHP has built-in features to help, but ultimately it’s the wrong place to address the problem. Apache has built-in features too, but the performance cost of  these features is prohibitive. This is where suPHP, created by Sebastian Marsching comes to the rescue.

Like Apache’s own suexec, suphp is a solution that allows PHP to run as the user and group that owns any particular website on a  server. Technically, suPHP is a tool for executing PHP scripts with the permissions of their owners.
It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the UID of the process executing the PHP interpreter.

Su-php consists of two components :-

* mod_suphp, an Apache module that replaces mod_php
* suphp, a setuid binary that replaces Apache’s suexec

Every time a PHP script is run, suphp has to fork Apache and then execute another copy of the PHP/CGI binary. This approach provides the absolute security benefits that we seek. It means that if a script contains a vulnerability, and got exploited, then only that particular user will be affected.

Su-PHP has the following advantages :-

* PHP runs as your user/group
* PHP files can have permissions of 640 (hiding things like passwords from other accounts)
* Files/folders written by PHP are written as user/group (no Apache or other global user)
* Custom php.ini file per site (can add/remove security options)

Note: Su-PHP does not allow permissions 666 and 777.

Some users make use of .htaccess files to set php configuration lines using php_flag var setting. Having a .htaccess file
use the php_flag directive will result in a 500 error be produced. PHP flags no longer work in the .htaccess file. If you
need to enable things such as register globals you can follow the below guide:

In .htaccess under public_html, add the following :-

======================================
suPHP_ConfigPath /home/user/public_html
order allow,deny
deny from all
======================================

Note: You must change user to your account username.

Create a php.ini file under public_html add any of the below settings that you need:-

=========================
register_globals = On
upload_max_filesize = 30M
post_max_size = 30M
memory_limit = 30M
upload_tmp_dir = 30M
max_execution_time = 180
=========================

Using a php.ini file may cause issues if your scripts use Zend Optomizer or IonCube encoding. You then just need to add the following to your php.ini file to resolve the issue:

Note: this may not be needed. Please test before using.

====================================================================
[Zend]
zend_extension=/usr/local/ioncube/ioncube_loader_lin_4.4.so
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.2.6
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.2.6
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
====================================================================

For the PHP settings you do not have in your php.ini file, PHP will use our default configurations. It will not use the
server php.ini but rather a default one. You may need to set other settings. You may create a phpinfo.php file in public_html with the beginning and ending php tags and the following in between to see any changes by browsing it

March 27, 2011 Posted by | Apache, htaccess, PHP | , , , | 1 Comment

PHP Mailing Script – 2

<?php
include(“Mail.php”);

/* mail setup recipients, subject etc */
$recipients = “feedback@userdomain.com”;
$headers[“From”] = “user@userdomain.com”;
$headers[“To”] = “feedback@userdomain.com”;
$headers[“Subject”] = “User feedback”;
$mailmsg = “Hello, This is a test.”;

/* SMTP server name, port, user/passwd */
$smtpinfo[“host”] = “smtp.userdomain.com”;
$smtpinfo[“port”] = “25”;
$smtpinfo[“auth”] = true;
$smtpinfo[“username”] = “smtpusername”;
$smtpinfo[“password”] = “smtpPassword”;

/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory(“smtp”, $smtpinfo);

/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);
?>

March 26, 2011 Posted by | PHP | | Leave a comment

PHP Mailing Script – 1

<?php
require_once “Mail.php”;

$from = “name Sender <mail@domain.com>”;
$to = “name Recipient <mail@domain.com>”;
$subject = “Hi!”;
$body = “Hi,nnHow are you?”;

$host = “mail.domain.com”;
$username = “smtp_username”;
$password = “smtp_password”;

$headers = array (‘From’ => $from,
‘To’ => $to,
‘Subject’ => $subject);
$smtp = Mail::factory(‘smtp’,
array (‘host’ => $host,
‘auth’ => true,
‘username’ => $username,
‘password’ => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo(“<p>” . $mail->getMessage() . “</p>”);
} else {
echo(“<p>Message successfully sent!</p>”);
}
?>

March 25, 2011 Posted by | PHP | | 1 Comment

PHP Page info “OR” PHP Testing Page

<?php
phpinfo();
?>

March 24, 2011 Posted by | PHP | | Leave a comment

How to find MySQL Version

You can find the MySql Version with the help of following commands :

# mysql  – -version

# mysql -V

# mysql -e status | grep ‘Server version’

That’s all.

March 23, 2011 Posted by | MySQL, Tips & Tricks | , , | 1 Comment

How to Import-Export MySQL database from shell

To export a database run

# mysqldump datbasename > databasename.sql

This will export the database to databasename.sql

To import a database from an sql dump file run

# mysql databasename < dumpsqlfilename.sql

This will import the sql file into the database. Once imported you should check to make sure it was correctly imported to do this run

mysql databasename
show tables;

If the you do not see any tables listed then the sql file likely has a USE statement at the top. Edit the sql file with a text editor and comment out the line “USE databasename”. Once commented out attempt to import the data and check the tablesl.

March 22, 2011 Posted by | MySQL, Unix/Linux | , , | 1 Comment

How to remove/uninstall RVSkin

You just have to run the following command as root on the server:

# perl /root/rvadmin/uninstall.pl

if for some reason RVskin was installed in a different location, change the path accordingly.

To complete this, restart cpanel:

# /etc/rc.d/init.d/cpanel stop

# /etc/rc.d/init.d/cpanel start

March 21, 2011 Posted by | cPanel | , , | 2 Comments

Rating of 127.0.0.X

Returned code –> Category –> Details

127.0.0.1 –>  Whilelist –> Trusted nonspam,
127.0.0.2 –>  Blacklist –> Block spam, accept as Open Relay, Hijacked PCs, Spam Source
127.0.0.3 –>  Yellowlist ->mix of spam & nonspam, do not blacklist or whitelist, Dynamic/ADSL/Cable Networks
127.0.0.4 –> Brownlist –> All spam, but not yet enough to blacklist, Domain Names, PTR of Dynamic Networks
127.0.0.5 –> Bulk ——–> NOBL listed, not a spam source, do not blacklist, maybe whitelist
127.0.0.6 ———-> Known relay server and dial-up user account
127.0.0.8 ———-> HTTP gateways – Insecure http servers deploying form to email gateways and cgi scripts.
127.0.0.9 ———-> Open proxy servers – Any server that acts as a proxy for spam,
127.0.0.14 ———> Black, grey, red (for testpoints)
127.0.0.255 ——-> your DNS is blocked from querying URIBL

=================================================

Return Code     Description

127.0.0.0/24 —-> Spamhaus IP Blocklists
127.0.1.0/24 —-> Spamhaus Domain Blocklists
127.0.2.0/24 —-> Spamhaus Whitelists

March 20, 2011 Posted by | Tips & Tricks, Unix/Linux | , | 5 Comments

WordPress : 500 Internal Error

After installation of Word-Press, it may be given 500 Internal Error, Here is following steps to resolve this :-

1. # chmod -R 755 public_html

2. # chown -R user.user public_html

3. # cd /home/user/public/html/

4. create php.ini file

5. write “suhosin.Simulation On” in php.ini file

6. if problem persist, then copy php.ini file to public_html/test/wp-admin

7. Also you can rename .htaccess to _.htaccess, sometimes it also create 500 internal error

March 19, 2011 Posted by | WordPress | , | 3 Comments

PHP ERROR – parse error unexpected t_string

If you get this error in the error log :

” PHP Parse error: syntax error, unexpected T_STRING”

Then just add the following code in the .htaccess file.

==========================
php_flag short_open_tag X
==========================

OR

If  the server is SuExec enabled  server then you can add the following code in the “php.ini” file

# vi /etc/php.ini “OR” /usr/lib/php.ini

==========================
php_flag short_open_tag X
==========================

March 18, 2011 Posted by | Apache, htaccess, PHP | , , , | 2 Comments

Warning_ file() [function.file]_ URL file-access is disabled in the server configuration

If you are getting the above error then  make the following changes in the php.ini file (Suexec  server) or .htaccess file (non-Suexec server) :-

# vi /usr/lib/php.ini (Suexec  server)

Edit follwoing lines

=======================
allow_url_fopen = On
allow_url_include = On
=======================

# vi .htaccess (non-Suexec server)

=====================================
<IfModule mod_php5.c>
php_admin_value allow_url_fopen On
php_admin_value allow_url_include On
</IfModule>
=====================================

March 17, 2011 Posted by | Apache, htaccess | , , | 1 Comment

Permission Deny Error on .htaccess

Error : [Tues March 15 22:01:42 2011] [crit] [client 127.0.0.1] (13)Permission denied: /home/username/public_html/.htaccess

When you get this errror, then  just run the following commands :-

# find -type d -exec chmod 755 {} ;

# find -type f -exec chmod 644 {} ;

# chown usename.username  * -R

March 16, 2011 Posted by | Apache, htaccess | , , | 3 Comments

Options FollowSymLinks or SymLinksIfOwnerMatch forbidden error

When you get this error while browsing your site :

====================================================================================
[Mon March  14 01:55:09 GMT 2011] [error] [client 127.0.0.1] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule
directive is forbidden: /home/username/public_html/foldername/403.shtml
====================================================================================

Just  add the following code in the .htaccess file  :

#  vi .htaccess

========================================
RewriteEngine On
Options +FollowSymLinks +SymLinksIfOwnerMatch
========================================

That’s all this will do it.

March 15, 2011 Posted by | Apache, htaccess | , , | 5 Comments

Outlook Express Error Codes

General Errors

ERROR CODE    DESCRIPTION

0x800CCC00      Authentication did not load.
0x800CCC01      Invalid certificate content.
0x800CCC02      Invalid certificate date.
0x800CCC03      User already connected.
0x800CCC04      CONN
0x800CCC05      Not connected to server.
0x800CCC06      CONN_SEND
0x800CCC07      WOULD_BLOCK
0x800CCC08      INVALID_STATE
0x800CCC09      CONN_RECV
0x800CCC0A      Message download incomplete.
0x800CCC0B      Server or maildrop is busy.
0x800CCC0C      NOT_INIT
0x800CCC0D     Cannot locate server.
0x800CCC0E      Cannot connect to server.
0x800CCC0F      Connection closed.
0x800CCC10      Address not known on server.
0x800CCC11       Mailing list not known on server.
0x800CCC12       Unable to send WINSOCK request.
0x800CCC13       Unable to read Winsock reply.
0x800CCC14       Unable to initialize Winsock.
0x800CCC15       unable to open Windows Socket.
0x800CCC16       User account not recognized.
0x800CCC17       User canceled operation.
0x800CCC18       Logon attempt failed.
0x800CCC19       TIMEOUT
0x800CCC1A      Unable to connect using Secure Sockets Layer (SSL)

============================================================================

WINSOCK Errors

ERROR CODE    DESCRIPTION

0x800CCC40      Network subsystem is usable.
0x800CCC41      Windows Sockets cannot support this application.
0x800CCC42      WINSOCK_WSAVEROCLIV
0x800CCC43      Bad address.
0x800CCC44      Unable to load Windows Sockets.
0x800CCC45      Operation now in progress. This error appears if a Windows Sockets API called while a blocking function is in progress.

===========================================================================

Simple Mail Transport Protocol (SMTP) Errors

ERROR CODE    DESCRIPTION

0x800CCC60      Invalid response.
0x800CCC61      Unknown error code.
0x800CCC62      Syntax error returned.
0x800CCC63      Parameter syntax incorrect.
0x800CCC64      Command not implemented.
0x800CCC65      Improper command sequence.
0x800CCC66      Command not implemented.
0x800CCC67      Command not available.
0x800CCC68       Mailbox is locked and busy.
0x800CCC69       Mailbox not found.
0x800CCC6A       Error processing request.
0x800CCC6B       User mailbox is known, but mailbox not on this server.
0x800CCC6C       No space to store messages.
0x800CCC6D       Storage limit exceeded.
0x800CCC6E       Invalid mailbox name syntax.
0x800CCC6F       Transaction failed.
0x800CCC78       Unknown sender. This is caused by having the incorrect e-mail address in the Reply-To field.
0x800CCC79       Server rejected recipients.
0x800CCC7A       No sender address specified.
0x800CCC7B       No recipients specified.

===========================================================================

Post Office Protocol version 3 (POP3) Errors

ERROR CODE    DESCRIPTION

0x800420CB       Mail cannot be stored on server.
0x800CCC90      Client response invalid.
0x800CCC91      Invalid user name or user not found.
0x800CCC92      Password not valid for account.
0x800CCC94      STAT Command required.
0x800CCC95      No messages on server.
0x800CCC96      No messages marked for retrieval.
0x800CCC97      Message ID out of range.

March 14, 2011 Posted by | Mail | , | 2 Comments

How to Redirect non-www to www domain using .htaccess

If you want to redirect your domain from  http://domain.com  to http://www.domain.com, then add the following lines in the .htaccess file for domain for which you want to set the redirection

============================================================
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule ^/?$ “http://www.domain.com ” [R=301,L]
============================================================

March 13, 2011 Posted by | Apache, htaccess | , , | 2 Comments

How to redirect from one page to another using .htaccess

If you want to redirect one page to another page, then add the following code in the .htaccess file in one line :

# vi .htaccess
==============================================================
redirect 301 /oldfile.htm   http://www.domain.com/newfile.htm
==============================================================

March 12, 2011 Posted by | Apache, htaccess | , , | 6 Comments