Yahoo hosting, no htaccess, and permalinks
January 21, 2009 @ 3:08pm
by Rob Sanchez
So everyone wants clean permalinks these days; those search engine friendly URLs are everywhere (even on our own site!), and made ubiquitous by Wordpress and other CMSes. The usual technique is to use Apache’s mod_rewrite module and an htaccess file to re-write the URLs (see here). But what if you can’t use an htaccess file? Well, I found out recently that Yahoo Small Business hosting does not allow htaccess files, at all, and I had to find a solution for that.
The solution for me? PATH_INFO, an environment variable in Apache, which is basically extra “information” at the end of a file path/URL. So if you have a URL like “www.xyz.com/index.php/permalink/” the PATH_INFO would be “/permalink/”. In PHP, it’s available in the $_SERVER global:
<?php
$path_info = explode('/', $_SERVER['PATH_INFO']);
// start parsing $path_info however you see fit
?>
Now, we already had a custom engine for using handling the mod_rewrite output, and I was able to use that parsed URL data and put it into our system. And have some nice-looking permalinks. There was a small compromise in having that extra “/index.php” in the URL, but I think it is still worth doing and better than no clean permalinks at all.
Tags
apache, htaccess, mod_rewrite, path_info, permalinks, PHP, yahoo
Comments
Using Template Tags In Wordpress Widgets
January 1, 2009 @ 6:23pm
by Rob Sanchez
When working on our Wordpress theme here, I was looking for a way to create a more custom widget than the default Categories widget, without having much know-how when it comes to Wordpress plugin design. But Google comes to the rescue: this great tutorial from Lonewolf Online on how to create a simple, custom plugin w/ widget. Then you can go crazy with template tags in widgets, even if you are not a pro with plugin creation.
Tags
Comments
jQuery Tablesorter Plugin
October 24, 2008 @ 9:59pm
Updated — February 3, 2009 @ 7:49am
by Rob Sanchez
I read about the jQuery Tablesorter Plugin a while back. It seemed cool enough.
tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.
I didn’t bother to try it out, though. I guess I didn’t really believe that it could work so easily.
Here I am months later, in need of some table sorting. So I went ahead and tried it. And it JUST WORKED. As advertised. I did not have to jump through any configuration hoops. Cross-browser? No problem. Developers, this plugin will save you time. Props to Christian Bach who created this plugin.
| Pet | Name | Color |
|---|---|---|
| Cat | Anna | Brown |
| Bird | Whistler | Yellow |
| Dog | Fido | Grey |
| Cat | Metro | Black |
| Dog | Rover | Brown |
Tags
javascript, jQuery, plugins, recommended








