admin

This user hasn't shared any biographical information

Homepage: http://www.cdl.gr


Posts by admin

htaccess Redirecting non-www to www with .htaccess

If you want to redirect all non-www requests to your site to the www version, all you need to do is 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://my-domain.com to http://www.my-domain.com. There are several benefits from doing that:

* It will avoid duplicate content in Google
* It will avoid the possibility of split page rank and/or split link popularity (inbound links).
* It’s nicer, and more consistent.

Note that if your site has already been indexed by Google without the www, this might cause unwanted side effects, like lost of PR. I don’t think this would happen, or in any case it would be a temporary issue (we are doing a permanent redirect, 301, so Google should transfer all rankings to the www version). But anyway, use at your own risk!

Something nice about the code above is that you can use it for any website, since it doesn’t include the actual domain name.
Redirecting www to non-www

If you want to do the opposite, the code is very similar:
in your .htaccess file

RewriteEngine On
RewriteCond %{HTTP_HOST} !^my-domain\.com$ [NC]
RewriteRule ^(.*)$ http://my-domain.com/$1 [R=301,L]

In this case we are explicitly typing the domain name. I’m sure it’s possible to do it in a generic way, but I haven’t had the time to work one out and test it. So remember to change ‘my-domain’ with your domain name! More >

Mega Drop Down Menus w/ CSS & jQuery

While in the process of redesigning 4wheelparts.com, I decided to explore new methods of working with our huge number of inventory and categories. I did some research and noticed a new trend for ecommerce sites in having what they call “mega drop down menus”.

According to usability expert Jakob Nielson, mega drop down menus tested to be more efficient for large scale websites.I decided to experiment with different ways of implementing this technique and would like to share how I achieved this method.

more visit http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/

HTML 5 Audio Tag

<!DOCTYPE HTML>
<html>
<body>

<audio src=”horse.ogg” autoplay=”autoplay” loop=”loop” controls=”controls” >
Your browser does not support the audio element.
</audio>

</body>
</html>

http://www.w3schools.com/html5/tag_audio.asp

PHP datetime Format

The format of the outputted date string . See the formatting options below. There are also several predefined date constants that may be used instead, so for example DATE_RSS contains the format string ‘D, d M Y H:i:s’. More >

15 Calendar & Time Script With Ajax and Javascript

Ajax Calendar help users to choose one or more dates from a graphical calendar presented in a month interface. Flat Calendar Style, Pop Calendar Style, Fade Effect Calendar Style and more Style make great looking improvement to the user interface of your web application

more http://php-ajax-code.blogspot.com/2007/07/15-calendar-time-script-with-ajax-and.html

More >

SIFR flash var wmode Transparency

//<![CDATA[
sIFR.replaceElement(named({sSelector:"h2", sFlashSrc:"Scripts/sifr/cdl.swf", sColor:"#a28c74", sLinkColor:"#333333", sHoverColor:"#333333", sWmode:"transparent" }));
//]]>

php number_format Decimal

<?php

$number = 1234.56;

// english notation (default)
$english_format_number = number_format($number);
// 1,235

// French notation
$nombre_format_francais = number_format($number, 2, ',', ' ');
// 1 234,56

$number = 1234.5678;

// english notation without thousands seperator
$english_format_number = number_format($number, 2, '.', '');
// 1234.57

?>

World Cup | Μουντιάλ 2010 | Mundial | Don’t miss a moment of action.

FootieFox Don’t miss a moment of action. FootieFox shows latest scores in your Firefox.

https://addons.mozilla.org/en-US/firefox/addon/725/?src=external-firefoxcup

3 Ways to Highlight Links to the Current Page

Solution #1: HTML/CSS only

With this solution, all you have to do is add in some extra classes to your HTML and use CSS to style them. Each page has a class on the body tag that identifies it: More >