htaccess - Redirects with more than 1 level deep not working

Posted by barfoon on Server Fault See other posts from Server Fault or by barfoon
Published on 2010-06-03T16:12:52Z Indexed on 2010/06/03 16:26 UTC
Read the original article Hit count: 291

Hey everyone,

Just moved to shared hosting on GoDaddy and Im trying to get my .htaccess rules working.

Heres what I have:

ErrorDocument 404 /error.php
Options FollowSymLinks

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.mydomain\.org$
RewriteRule ^(.*)$ http://mydomain.org/$1 [R=301,L]

RewriteRule ^view/(\w+)$ viewitem.php?itemid=$1 [R=301,L]
RewriteRule ^category/(\w+)$ viewcategory.php?tag=$1 [R=301,L]

RewriteRule ^faq$ faq.php
RewriteRule ^about$ about.php
RewriteRule ^contact$ contact.php
RewriteRule ^submit$ submit.php
RewriteRule ^contactmsg$ handler-contact.php

All the pages @ the root of the domain seem to be working i.e mydomain.org/faq, mydomain.org/about are working.

But whenever I try mydomain.org/category/somecategory, I get a 404. How can I fix my .htaccess to obey these rules that are more than 1 level deep?

Thanks,

© Server Fault or respective owner

Related posts about mod-rewrite

Related posts about .htaccess