Archive for February, 2009

quick fix | No Comments | February 12th, 2009

A regex that will check for any characters that are not in the list below and return true if any unknown characters are found

a-z
A-Z
0-9
_ (under-dash)
– (hypen)
(space)

$text = preg_replace(‘/[^a-zA-Z0-9_ -]/s’, , $text);

Mode rewrite, quick fix | No Comments | February 9th, 2009

want to redirect

http://www.mydomain.com/index.htm     to http://www.mydomain.com

add this code in htaccess file  ::

RewriteRule ^index.htm$ http://www.mydomain.com/ [R=301,L]