Get the filename from upload form using Javascript

I needed a way to access the filename of a file being uploaded or attached using the input file from a form. So, I created a nice little function to achieve this. Hopefully it comes in handy for someone.

 

Javascript – Capitalize Each Word in a String

This is a great little function that I whipped up and use to capitalize every word in a string. I can’t tell you how many times I’ve had to use this. Hope you find it useful as I have!

 

Datejs – An Open-Source JavaScript Date Library

Datejs is an open-source JavaScript Date Library. Comprehensive, yet simple, stealthy and fast. Datejs has passed all trials and is ready to strike. Datejs doesn’t just parse strings, it slices them cleanly in two.

 

Adding 301 Redirects using htaccess

It’s easy adding 301 redirects to your website using Apache’s htaccess. A 301 redirect is the most efficient and Search Engine Friendly method for web page redirection. It’s not difficult to implement and will preserve your search engine rankings as well.

Often when someone does a redesign of their website or puts it into a new platform, and little consideration is regarded for the difference between the existing an new link structure. You should have a redirect in place if your old link structure varies from the new one. This will help you maintain you search engine rankings and decrease the possibility if someone reaching a 404 page.

Below is one variant of a 301 that redirects when someone tries to access your website without the (www); It will redirect the URL to your website with the www. You should choose which variation your website should stick with because accessing your website both ways is bad for Search Engine Optimization.

So, to implement this type of redirect for your website, follow these instructions:

  1. Open up notepad or any other text editor and copy and paste the commands below.
  2. Change (yourdomain) to your domain name.
  3. Save the file with this name: (.htaccess). There is no file name. If you have a problem doing this on Windows, read this article.
  4. Upload it to the root directory of your website.