The Rewrite Mod is often noted as the Swiss Army Knife of htaccess URL manipulation, a tool with unlimited functionality and flexibility though also one with a lot of complexity.
On that note it is also probably the most confusing feature for an htaccess novice, so don’t expect to understand this entire module in just one day.
The Rewrite Mod uses regular expression rules to rewrite requested URLs on the fly. It allows you to apply an unlimited amount of rules that can contain an unlimited amount of rule conditions to provide a really flexible and powerful URL manipulation tool. The rules rely on various server variables, environmental variables, HTTP headers, time stamps and even external database lookups.
Continue reading “A Day in the life of the htaccess RewriteEngine : Part 1 – Rewrite Directives” »
Sometimes you may need to password protect specific folders and files in your website without creating an entire user system or making a complicate setup and there are several ways of doing this.
You can create a simple html username/password form that posts to a server side script using PHP, PERL or ASP to set a valid user session. There is also the option of using client side JavaScript, though I would never recommend this as it’s not a secure or fool proof approach.
Continue reading “htaccess Password Protection using htpasswd and htdigest” »
I am sure you have clicked on a link only to end up with a generic 404 page not found error, most of the time caused because the page was removed from the site though it was still indexed in the search engines.
A great feature with the .htaccess file is being able to specify your own error documents, pointing an error to a custom page. Before you open up your .htaccess file in notepad you should get familiar with the servers error codes and what pages you should and shouldn’t use.
Continue reading “Setting Up An htaccess Error Document or Error Page” »
Posted on : 13-Jan-2010 | By : jontroth | In : Projects, Websites
TheCoverGuy.com is a successful online service providing a 24/7 access point to their clientele from coast to coast. The Cover Guy sells custom made hot tub covers and spa covers to North American clients.
When the company approached me to make their online purchasing process faster, easier and safer I was more than happy to take the challenge. The website was getting great traffic though the conversion rate was a little under average. Getting that traffic to select a cover, enter all their custom information and complete the transaction was my main goal to bring this already successful site into a league of it’s own.
Continue reading “Redesigning traffic for the perfect Hot Tub Cover company – TheCoverGuy.com” »
From my first day of web application development the .htaccess file has been my favourite quick and dirty file. It’s a perfect tool to get the job done when you don’t have write access or any permissions to the servers main config files. Over the next few weeks I am going to post everything I have come across in regards to using the .htaccess file; from security issues, redirecting traffic, the rewrite engine and helpful PHP commands.
Let’s start from the basics. The .htaccess file is a simple ASCII formatted file allowing you to create and edit it in a basic text editor like SimpleText or NotePad. The file can only be used on UNIX systems and not on Windows NT. Though not all 3rd party hosting servers are setup to use .htaccess files, some disable .htaccess all together and some only disable certain commands.
Continue reading “The Great World of the .htaccess File” »