.htaccess

Home » .htaccess (69)

Create SEO friendly URL's using mod rewrite
In this tutorial I will show you how to convert dynamic URL's into Search Engine Friendly and easy to understand both for humans and machines URL's. To change the URL's we will use the Apache's mod_rewrite function what can easily match URL's using regular expressions. If it sounds confusing don't worry, I will explain everything step-by-step and you can always leave a comment!

Removing the .php Extension From a URL
If you are developing a website in PHP then most of your files will end in the .PHP file extension. This works just fine for your development, but when you release your website the .php extension is just added characters in the URL.
Most websites that use PHP simple have the extension of the page removed. This leads to cleaner, shorter, and easier to read URLs. It is also better for your SEO or Search Engine Optimization.

Create SEO friendly URL's using mod rewrite in PHP (.htaccess)
In this tutorial I will show you how to make your URL`s more SEO friendly using Apache mod_rewrite to rewrite your URL`s by editing your .htaccess file.

Top 10 Tips and Tricks
Creating custom documents gives your site a more professional look, as not only are you providing a 'net' to catch unsuspecting visitors. The top ten htaccess tips and tricks used by web developers.

mod_rewrite Tutorial for Absolute Beginners
Explains what mod_rewrite is and how to use it. Includes 3 practical examples: 301 redirects, creating friendly URLs, and blocking image hotlinking (leeching).

Password Protecting Your Pages
Learn how to use Apache's .htaccess files to protect pages on your site with a username and password.

Making a Custom Error Page
In this tutorial we'll show you how you can display attractive error pages for your site's visitors instead of the ugly defaults.

Create custom 404 file not found page
I this post I will go over creating a custom 404 file not found page
which will be displayed every time the visitor is trying to access a page that doesn't exist.

Mod Deflate - Compress Your Web Pages and Save Bandwidth
Optimize your website so that it consumes less bandwidth using the Apache module mod_deflate. This module adds an output filter that allows output from your server to be compressed. A great side effect of the implementation of this module is that it also speeds up your website.

Creating error pages
We can create custom Error Pages using .htaccess file. Still you've a
chance to update error pages, updating apache configuration.

301 and 302 redirects with .htaccess
How to redirect directories and old URL's to new ones when moving your site from one domain to another, or launching a new version with re-structured URLs.

Redirecting Browser Dependent Content with Apache and Mod Rewrite
How to use the Apache mod_rewrite module to automatically redirect a user to a page designed specifically for their web browser.

Steps to be implemented while migrating from Apache to Lighttpd web server
This tutorial takes a pragmatic look on the migration path from Apache httpd. It shows how to port basic configuration, rewrite and redirect rules, how to deal with .htaccess files, and even discusses when not to migrate.

htaccess: Stopping "page not found" errors
How to use an .htaccess file to automatically redirect requests for files that may have moved following a site redesign. This really useful technique will stop your users getting "page not found" errors after bookmarking pages on your site that no longer exist. Also solves problem of search engines that haven't caught up yet with your new site structure.

Changing the Default Directory Page
This guide shows you how to change your default directory page with the DirectoryIndex command.

Custom Error Documents
Prefer to use your own custom error documents instead of the boring default ones?

Prevent Viewing of Files
Lets say you have a file that you don't want anyone to view.

Block Unwanted Referers
Why would you want to block a referer? Well, for one, there are some sites that use webcrawlers that store a url of a page from that site and transmit it as a referering URL when they access your site. They do this thinking (and hopeing) that the URL will go into a publically available hit log for your website and that the URL will be displayed as a link back to their site resulting in their site getting a higher page ranking in search engines.

Setting Error Pages
Setting error pages using .htaccess is easy.

IP Banning
Ban a visitor from visiting your site by banning their IP address.

Home » .htaccess (69)