.htaccess help please!

admin

Administrator
Staff member
Hi guys i have just added a mod to my forum hosting script that makes urls more search engine friendly <br /><br />i also had to add this code in .htaccess <br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Options +FollowSymLinks<br />RewriteEngine On<br />RewriteRule ^main.html(.*) index.html$1 [NC]<br />RewriteRule ^forums.html(.*) viewforum.html$1 [NC]<br />RewriteRule ^topics.html(.*) viewtopic.html$1 [NC]<br />RewriteRule ^groups.html(.*) groupcp.html$1 [NC]<br />RewriteRule ^messages.html(.*) privmsg.html$1 [NC]<br />RewriteRule ^profiles.html(.*) profile.html$1 [NC]<br />RewriteRule ^sessions.html(.*) login.html$1 [NC]<br />RewriteRule ^online.html(.*) viewonline.html$1 [NC]<br />RewriteRule ^questions.html(.*) faq.html$1 [NC]<br />RewriteRule ^security.html(.*) login_security.html$1 [NC]<br />RewriteRule ^members.html(.*) memberlist.html$1 [NC]<br /><br />RewriteRule ^(.*).html-(.*)-(.*)-(.*)-(.*)-(.*)-(.*) /$1.php?$2=$3&$4=$5&$6=$7 [NC]<br />RewriteRule ^(.*).html-(.*)-(.*)-(.*)-(.*) /$1.php?$2=$3&$4=$5 [NC]<br />RewriteRule ^(.*).html-(.*)-(.*) /$1.php?$2=$3 [NC]<br />RewriteRule ^(.*).html-(.*) /$1.php?$2 [NC]<br />RewriteRule ^(.*).html /$1.php [L]<!--c2--></div><!--ec2--><br /><br />The problem now is that i can not get to my pages <!-- w --><a class="postlink" href="http://www.cfforums.co.uk/contactus.html">www.cfforums.co.uk/contactus.html</a><!-- w -->, <!-- w --><a class="postlink" href="http://www.cfforums.co.uk/terms.html">www.cfforums.co.uk/terms.html</a><!-- w --> and <!-- w --><a class="postlink" href="http://www.cfforums.co.uk/default.html">www.cfforums.co.uk/default.html</a><!-- w --> can anyone help with what code i will need to add to .htaccess to fix this<!--content-->
your rewrite rule (most notably the one at the very bottom of the script) rewrites BLA.html to BLA.php<br /><br />as such when you access contactus.html the server is attempting to fetch contactus.php<br /><br />it might be a better idea to use a specific sub-directory, at least in name, to stop this sort of thing (or merely rename your files to php).<!--content-->
 
Top