php Content tagged as php.

PHP 301 Redirects

The preferred way of redirecting a page that has moved is by a 301 redirect. In PHP, 301 redirects are not the default (a 302 redirect is the default). Whenever you move a visitor to a new location, you should use the PHP 301 redirect, which involves one extra line of code. In PHP, a 302 redirect is done as follows... header('location:...
> articles/33/php-301-redirects/

Optimizing Webmaster Credits

Most web designers and webmasters like to have a sitewide footer link on each site they build. But more often than not, these webmaster credits aren't optimized, and won't provide as much link value as they could. The process of optimizing webmaster credits is simple, easy to script and will get these credits working for you. This article covers...
> articles/31/optimizing-webmaster-credits/


Session IDs in PHP can cause some real problems when search engines index your pages. For this reason, you should disable PHPSESSID on your sites, and keep session IDs in cookies instead. If you disable PHPSESSID in the URL, this can become a usability issue, as all visitors must have cookies enabled to make use of any code that requires...
> articles/26/disable-phpsessid/

Redirects - the good, the bad and the ugly

Redirects are an important part of a well maintained site. As pages are deleted or moved, it's common courtesy to sent the visitor to the new page, or at least apologise for the inconvenience. Types of redirect Redirects come in several flavours. Redirects can be done by the server, or by the client (browser). Generally speaking, a server...
> articles/6/redirects-the-good-the-bad-and-the-ugly/

Tags related to php