PHP Development

Quick Search

url rewriting for seo friendly URL, Convert .php to .html

July 26th, 2010 by admin
1 comment »

For rewriting the URL, you should create a .htaccess file in the root folder of your web directory. And have to put the following codes as your requirement.

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.htm$ $1.php [nc]

The following example will rewrite the test.php to test.html i.e when a URL like http://localhost/test.htm is called in … Read More

Get the width and height of an image using a function in PHP

March 2nd, 2010 by admin
No comments »

Syntax

 

list($width, $height, $type, $attr) = getimagesize(“image_name.jpg“);

< ? php

Read More

Redirecting non-www to www with .htaccess

February 27th, 2010 by admin
No comments »

If you would like to redirect all non-www requests to your site to the www version, you need to add the following code to your .htaccess file:

in your .htaccess file

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.

RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

This will redirect any requests to http://your-domain.com to http://www.your-domain.com. There are some benefits from doing … Read More

SEO Company India

search engine marketing company India that offers affordable seo services