htaccess - Redirects with more than 1 slash not working
Posted
by barfoon
on Stack Overflow
See other posts from Stack Overflow
or by barfoon
Published on 2010-06-03T14:52:45Z
Indexed on
2010/06/03
14:54 UTC
Read the original article
Hit count: 296
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,
© Stack Overflow or respective owner