Hello!
I have been using the mixed mod-rewrite without any problems, but I am wanting to run a new rewrite rule for my main site files that rewrites .html to .php in the urls. (in other words, a link to page.html is actually page.php) I have it working just fine, but the rule causes a 404 when you try to view a topic in the forum. I think (??) it is caused by my new rule.
So, how can I write this rule so that it ignores anything in the /forum/ directory? (or am I going about this backwards?)
Here's a snippet of the .htaccess in my site root. My phpbb is located in /forums/:
RewriteEngine On
#add the www always
RewriteCond %{HTTP_HOST} !^www\..* [NC]
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]
#rewrite .html to .php
RewriteRule ^(.*).html$ $1.php
#phpBB SEO Mod addition
RewriteBase /
###########skip the credits......
# FORUM PROTECTION RULE
RewriteRule ^forums/.+/([^/]+\.html)$ /forums/index.php [R=301,L]
# CATEGORIES
RewriteRule ^forums/.+-vc([0-9]+)\.html$ /forums/index.php?c=$1 [QSA,L]
......etc....etc....etc...etc The rest is stock mixed mod_rewrite
So, can I tell my rule to fix everything EXCEPT the /forum/ or is there a better fix?

English |
French
