httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blomstrom <>
Subject [users@httpd] Mod_rewrite Newbie Questions
Date Mon, 15 Aug 2005 01:52:18 GMT
I've bookmarked several mod_rewrite tutorials and am
currently working on one at

I very quickly got hung up on a couple items. Before I
continue, let me give you a brief overview of what I
want to do.

You can see a page where I want to display articles
about animals at

If you change the URL to,
then you can click "Chordata" at the top of the column
on the right, changing the URL to
You can continue clicking Mammalia, followed by any
order, with similar results.

I want to change this so the URL's follow this

There will tentatively be articles for kids at the
following rewritten URL's:

Another section produces raw URL's that look like

I want them shortened to...

So I have three basic "raw" URL's that look something
like this:

I want them to display like this: Mammals

* * * * * * * * * *

The tutorial directed me to visit the infamous
mod_rewrite RewriteRule Generator at

I want to get this up and running on my computer
first, and I assume everything will automatically be
translated for the Internet when I publish my files
online. So I used
http://geozoo/stacks/index.php?taxon=Animalia as an
example of "Your Dynamic URL," then chose Directory

I entered this for Page Name:


It generated this rule:

Options +FollowSymLinks
RewriteEngine on
RewriteRule index/(.*)/(.*)/$ /stacks/index.php?$1=$2

...and said my page would be rewritten to this URL:


Instead, I want it rewritten to
http://geozoo/stacks/Animalia/, which will translate
(I hope) into

But I decided to play with this for the time being. So
I created a .htaccess file and pasted the rule in it.

But when I type http://geozoo/index/taxon/Animalia/
into my browser, I get no results. So I appear to be
doing at least two things wrong.

* * * * * * * * * *

I haven't been restarting my computer at various steps
of this tutorial, because I haven't been directed to
do so. I have a str_replace function designed to
replace spaces in multi-word phrases like "Tundra
Mammals" with a +, but I'm using it on this page yet.

Do you have any idea what I'm doing wrong?


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message