RewriteEngine on

# disable directory browsing
Options All -Indexes

RewriteCond  %{REQUEST_FILENAME}  !(fckeditor)

RewriteRule ^(.+).html$ $1/?%{QUERY_STRING}

RewriteRule ^email-forums/([^\/]+)/$ emailForums.php?tid=$1&%{QUERY_STRING}

#-------Forums---------

RewriteRule ^forum/search/$ forumSearch.php

RewriteRule ^forum/$ forums.php

RewriteRule ^forum/([^\/]+)/([^\/]+)/$ forumsResponses.php?title=$1&topic_title=$2&%{QUERY_STRING}

RewriteRule ^forum/([^\/]+)/$ forumsTopics.php?title=$1&%{QUERY_STRING}

RewriteRule ^createforumtitle/$ forumsAddTitle.php?&%{QUERY_STRING}

RewriteRule ^forumcreate/([^\/]+)/$ forumsTopicCreate.php?title=$1&%{QUERY_STRING}

RewriteRule ^forumcreate/([^\/]+)/([^\/]+)/$ forumsResponseCreate.php?title=$1&topic_title=$2&%{QUERY_STRING}

RewriteRule ^forumcreate/([^\/]+)/([^\/]+)/([^\/]+)/$ forumsResponseCreate.php?title=$1&topic_title=$2&response_id=$3&%{QUERY_STRING}

ErrorDocument 404 '<b>File Not Found</b>

RewriteCond   %{REQUEST_FILENAME}  !-f

RewriteRule ^([^\/]+)$ error.php

RewriteRule ^error/$ error.php