[users@httpd] Why isn't mod_rewrite working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mod_rewrite actually seems less difficult than I at
first imagined. However, I'm doing something wrong, as
it isn't working yet.

These are the steps I've followed:

1. Added this to my httpd conf file:

<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

2. Verified that my .htaccess file is functioning

3. Pasted this in my .htaccess file:

* * * * *

# You don't need to restart anything after modifying
.htaccess.
# Add /? before first $ in every row if you want
optional trailing slashes.
RewriteEngine On
RewriteRule ^test\.htm$ test.php [L]

RewriteRule ^stacks/([a-zA-Z]+)/?$
stacks/index.php?taxon=$1 [L]
RewriteRule ^kids/stacks/([a-zA-Z]+)/?$
kids/stacks/index.php?taxon=$1 [L]
RewriteRule ^topics/([a-zA-Z+]+)/?$
topics/index.php?topic=$1 [L]

# More specific examples...
# RewriteRule ^stacks/(Animalia|Chordata|Mammalia)/?$
stacks/index.php?taxon=$1 [L]
# RewriteRule
^kids/stacks/(Animalia|Chordata|Mammalia)/?$
kids/stacks/index.php?taxon=$1 [L]
# RewriteRule ^topics/(Biomes|Tundra|Tundra\+Mammals)$
topics/index.php?topic=$1 [L]

* * * * *

(I also tried it earlier without the /? for trailing
slashes.)

But it isn't working. My online page at
http://www.geozoo.org/stacks/ (which doesn't have
mod_rewrite yet) works just like my local page. If you
type in www.geozoo.org/stacks, it defaults to
www.geozoo.org/stacks/ Clicking "Aves" on the right
then yields a dynamic link -
http://www.geozoo.org/stacks/index.php?taxon=Aves

Have I missed a step, or is something else wrong?

Thanks.



		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux