Mod rewrite Tutorials

overview - syntax - basic - medium - advanced

Mod Rewrite Basic tutorials

The majority of you came to this site to find out how to do one of these basic tutorials. So lets go ahead and line up what we'll be learning.

Tutorial 1
Simple Static to Dynamic Mod Rewrites

It's easier than you think. Out of all the rewrites I've done I'd say I still do this type of rewrite the most. If you are working on a non commercial web applications then you should be able to implement this type of mod rewrite in just a few minutes.

Scenario: We have a dynamic site that out puts query strings in the urls. We want to change these dynamic urls to static search engine friendly urls. All the current web pages use a .php extension. We want the urls to look like a plain html page with a .html ext.

 


Tutorial 2
301 and 302 redirects using mod rewrite

Redirects are some of the easiest rewrites to do. They are very powerful so becareful. I'll just go over the most popular and then let anyone that wants to write a note about redirects post away after the tutorial.

Scenario 1: We have changed the file name /blue-widgets.html to /awesome-blue-widgets.html. We need to set up a 301 permanent redirect so any user or search engine bot that visits the old file will be redirected to the new.

Scenario 2: We've changed our domain name. We've set up every single file on the new domain. All the files will keep the same name, directory structure and extensions. We need to redirect users and search engine bots to our new domain via 301 so the new site starts getting picked up.



Tutorial 3
File and file Extension rewrites

These rewrites in this tutorial are helpful when you are changing old static .html files into a more dynamic server side scripting file like .asp, .jsp, .cfm or .php. Some of these also fall under the "if I did this it would look cool" category. Enjoy!

Scenario 1: We have a dynamic site using .php extensions. We just want to make the site look less dynamic and more like hand made. All the file names are staying the same, we just want to change the extensions to .

Scenario 2: We own a music store online. For our cd catalog online we want to change the file extensions from .php to .cds. We think users will get a laugh if the call up the file /catalog/metalica.cds .

 


 

<< mod rewrite syntax :: basic mod rewrites :: medium mod rewrites >>

Questions that are answered here:

  • What is a mod rewrite?
  • What can a mod rewrite do?
  • How do I rewrite my messy urls
  • How do I make clean urls

On Page Resources

  1. Non commercial Application - These are dynamic pages that you, your developers, free lancers or kid brother have written.

  2. 302 Page Hijack - There are 2 files involved with a page hijack. The hijacker file and the hijackee file. The hijacker is the file the sends the 302 redirect. the hijackee is the file that gets hijacked.

    The hijacker file will inherit the search result title and description. It will also show the cache of the hijackee.

    The hijackee will not know anything has happened until the owner of the hijackee file checks for the file in the search engines and cannot find it.

 

Mod Rewrite (Home) | Mod Rewrite Tutorials | Directory | Code Library | Blog | Mod Rewrite Quick Guide

copyright © 2001 - 2010 Webforgers.net
Owned By SEO Uncloaked, LLC
Aggressive Search Engine Optimization
All rights reserved.