What Is a Session?How to set .htaccess 301 redirection? ~ Interview Questions & Answers

Tuesday, April 28, 2009

What Is a Session?

A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests.
There is only one session object available to the PHP scripts at any time. Data saved to the session by a script can be retrieved by the same script or another script when requested from the same visitor.
Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.

Monday, April 6, 2009

How to set .htaccess 301 redirection?


RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

For more details refer http://www.seobook.com/archives/001714.shtml