JavaScript Editor Ajax software     Free javascripts 

Main Page

You can find the official documentation of mod_rewrite at
. The introduction to mod_rewrite is located at
. There are multiple books dedicated to mod_rewrite. We
The Definitive Guide to Apache mod_rewrite
(Apress, 2006).
The rest of this chapter is dedicated to URL rewriting, using various exercises covering the following:
Installing mod_rewrite
Testing mod_rewrite
Working with regular expressions
Rewriting numeric URLs with two parameters
Rewriting keyword-rich URLs
Building a link factory
Pagination and URL rewriting
Rewriting images and streams
Installing mod_rewrite
If you’re implementing the exercises in this book using an external hosting provider, it’s very likely that
mod_rewrite is already installed and enabled. In that case, you can simply skip to the next section, “Testing
mod_rewrite.” Consult your web host for information regarding whether mod_rewrite is supported and
If you’ve installed Apache yourself, read on. Because of its popularity, mod_rewrite is now included
with all common Apache distributions. If desired, you can verify if your Apache installation has the
mod_rewrite module by looking for a file named
under the
folder in your
Apache installation directory.
However, mod_rewrite may not be enabled by default in your Apache configuration. To make sure,
open the Apache configuration file, named
. If you’ve installed Apache using the XAMPP
package as instructed in Chapter 1, the full path of the file will be
\Program Files\xampp\apache\
and find the following line:
#LoadModule rewrite_module modules/
The leading
means the line is commented, so remove it in order to have Apache load the mod_rewrite
module upon its startup:
LoadModule rewrite_module modules/
After any change to
, you need to restart the Apache server in order for the changes to take
effect. In case you run into trouble, you can check Apache’s error log file (
), which
should contain the details of the error.
Chapter 3: Provocative SE-Friendly URLs
c03.qxd:c03 10:39 48

JavaScript Editor Ajax software     Free javascripts 
Bitcoin Gambling Site . paperhelp code