.htaccess Tutorials
Block Access to Include Files Using .htaccess
When I build websites for clients and myself, I use numerous include files to make my website easy to maintain. These include files may:be composed of pure HTML; no server-side programming involvedbe PHP class files; used throughout the websitecomposed of both HTML and PHPPHP code...
WordPress’ .htaccess File Is Genius
Choosing to use WordPress was a more difficult decision that you may think. Sure, WordPress is the most used blogging software on the internet, but I'm a programmer, right? I should want to code everything myself, right? I thought that at first but...
Prevent Image Hotlinking With .htaccess and mod_rewrite
One way to kill your website's bandwidth and overall download speed is to not block image "hotlinking." What's hotlinking? Hotlinking is linking to a file on an external server that the Web Developer does not own (most of the time the Web Developer doesn't...
Advanced Branding – Give Your Pages A Custom Extension Using .htaccess SetHandler
A sign of a good website is one that does the "little things" to increase the usability or value to the user. There are other little things you can do to enhance your website, including giving your pages a custom extension.The Code What the following code...
Hide Your .htaccess Settings Using … .htaccess
Your .htaccess file can hold a good amount of information about the structure of your website, some of which should not be exposed to users. These settings include mod_rewrite settings, php_flag/php_value settings, and SetHandler directives.Luckily, you can use your .htaccess file to hide your .htaccess...
Custom Error Page Tips – Designate The Pages You Hope No One Sees
Creating custom error pages is extremely ironic in that you put great effort into pages you hope no one sees. Custom error pages are worth the effort as they:keep a person at your site -- without the custom error page, the user sees an ugly...
Quick & Easy CSS Compression Using PHP
Loading time of a website is as important as its functionality. You can have a great website but who wants to wait for it to load? CSS compression can help your website load faster and easily maintain its functionality. I've created an easy-to-use...
Set Your Directory Index (Homepage) Using .htaccess
As every web developer knows, the server default for a directory's default file is index.{extension}. Apache is usually set to index.php or index.html. It's a good practice to set your DirectoryIndex setting in your .htaccess file, especially if you're hosting your website on shared...
Prevent Directory Listings With .htaccess
Preventing a directory listing for your website is essential these days. If a hacker knows your website structure you can be left open for a world of hurt. Did you know that you can prevent directory listings for every directory in your website by...
Adios Means Goodbye – Browser 301 Redirects In All Languages
Browser redirects, especially 301 "permanent" redirects, are essential to all good web applications. Regardless of language, browser redirects can: provide safe URL forwarding to gather GET and POST variables and process them without risking data and processing integrity by a browser refresh send users and search engine...