Archive for June, 2007

Make phone numbers clickable to dial on mobile phones.

Thursday, June 14th, 2007

If you’re designing a page for a mobile web browser, and you want to make the phone number “clickable” so that a mobile web browser can click and dial the number, just add the code below:
<a href="wtai://wp/mc;8015551212">801-555-1212</a>

update: Sadly I really should check out THIS site on a mobile browser, so I have no idea if it’s useful or not - but just in case you’re coming here FROM a mobile browser and want to test it out - here is a sample link: 801-555-1212

update#2: Thanks to a comment from Jane, I’ve now learned that Apple’s iPhone needs that formatted differently:
<a href="tel:1-801-555-1212">1-801-555-1212</a>
I’ve tested it on my phone (which isn’t an iPhone) and it still works. I have an LG-VX8100. If you test it, please leave a comment indicating what kind of phone/browser you’re using and if it worked or not…

Please test the following link:
1-800-555-1212

Redirect a subdomain to a directory using .htaccess

Wednesday, June 13th, 2007

I will tell you right off the bat that I don’t “get” regular expressions, and I don’t get .htacess rewrite rules. I wish I understood them better, but there’s some part of my brain that just fights me every time I try to get a better all-around understanding. Still, I have to (and want to) do stuff with htaccess, so I end up digging for code online, and trying stuff until something works. I wish I knew more about WHY it worked, but I’m just happy that it works at all. :)

Now that I’m done with my disclaimer, on to the point of this post. I had to use a htaccess file to redirect a subdomain to a directory in the main domain. For example: http://blog.mysite.com needed to point to http://www.mysite.com/blog/

After much digging and trial and error, this seems to work:RewriteEngine On
RewriteCond %{HTTP_HOST} ^blog\.mysite\.com
RewriteRule ^(.*)$ /blog/$1 [L]