Wondering how to get a nice url such as http://www.farmsoftstudios.com/tools/ajax/tutorials.html to run a query for you? Here’s how to get this url: http://www.farmsoftstudios.com/tools.php?type=ajax&style=tutorials to the url listed above. You’ll need a .htaccess file in the directory that you are working from. Create that, and then add these lines:RewriteEngine OnTo dissect that, first, you are calling an apache directive called RewriteRule. That tells apache that you want this url rewritten. Then you list the structure that you want created. In our case, that is tools/ (which is static) and then the query’s “variables.” What I mean by that is when I type
RewriteBase /your/sub-directories/if/any
Options +FollowSymLinks
RewriteRule tools/(.*)/(.*)\.html$ tools.php?type=$1&style=$2http://www.farmsoftstudios.com/tools/ajax/examples.html into the address bar, it creates a new query with &style=example instead of tutorials. Pretty slick, eh?
May 26, 2008
June 18, 2007
Getting a RewriteCond to work
April 26, 2007
AJAX Contact Form
I am releasing a beta-version of my new AJAX contact form. you can find it here: contact.php. Notice that all the links on the top are just there to show you how it would look as placed in a webpage. Comments, bug-reports, or anything else are appreciated. Thanks!
April 13, 2007
New Contact Form
I totally rewrote the contact form, making it a completely table-less design. The form validation still works, and the code is a whole lot cleaner now.
Go ahead and try it out!
April 10, 2007
Updated Portfolio
Just updated the theme of my portfolio today. I added ‘LightBox’ support in there, which hopefully speeds up the loading time.