Management & Finance

Video Tutorial: Eliminating Dynamic URLs with Mod_Rewrite

View Tutorial Get started using Mod_Rewrite to clean up your website’s dynamic URLs with this video tutorial presented by Practical eCommerce’s online director Brian Getting. We’ll look at using simple Mod_Rewrite commands in an .htaccess file to get rid of those ugly dynamic URLs that look like this:

<code>http://www.sample-website.com/index.php?id=435&amp;amp;type=ugly%20urls&amp;amp;why=I%20do%20not%20know
</code>

By the end of this tutorial, you’ll have a better understanding of what it takes to make an ugly, dynamic URL like the one above into a clean, search engine friendly URL like this:

<code>http://www.sample-website.com/435/nice/clean/url
</code>

We start by creating a simple PHP script that will gather variables from the URL string and output them, which will allow us to verify that our Mod_Rewrite changes are working properly. From there we move on to re-mapping URLs using Mod_Rewrite directives in our .htaccess file.

This tutorial is intended for website developers that are hosting websites on servers running Apache web server with Mod_Rewrite enabled, and access to their website’s .htacess file. Please contact your hosting company for more information about your account. A basic understanding of server-side scripting and website administration is assumed.

Software Used: Adobe Dreamweaver 8

Required Server Software: Apache Web Server w/ Mod_Rewrite enabled

Sample Files: mod_rewrite_1.zip

View Tutorial

This video tutorial requires Flash Player version 8 or above. Please forward us your ideas for additional video tutorials, via our Contact Us form.

Brian Getting

Brian Getting

Bio   •   RSS Feed


email-news-env

Sign up for our email newsletter