PDA

View Full Version : Mod rewrite friendly urls not working


saini1987
11-30-2013, 03:16 PM
Hi,

i recently started a forum:

http://www.fitnesshealthforum.com

i enable mod rewrite friendly urls and added htaccess file. Here is the code

RewriteEngine On
Options +FollowSymLinks

### THIS IS A LITTLE EXTRA SECURITY AND CAN BE REMOVED

RewriteRule ^includes/(.*) index.php
RewriteRule ^vb/(.*) index.php
RewriteRule ^packages/(.*) index.php

### THIS IS THE ACTUAL REWRITE

RewriteRule ^threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) showthread.php?t=$1&page=$2&%{QUERY_STRING}
RewriteRule ^members/([0-9]+) member.php?u=$1&%{QUERY_STRING}
RewriteRule ^forums/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) forumdisplay.php?f=$1&page=$2&%{QUERY_STRING}
RewriteRule ^blogs/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) blog.php?u=$1&page=$2&%{QUERY_STRING}
RewriteRule ^entries/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) entry.php?b=$1&page=$2&%{QUERY_STRING}
RewriteRule ^list/([^/]*/)([0-9]+) list.php?r=$1$2&%{QUERY_STRING}
RewriteRule ^content/(.*) content.php?r=$1&%{QUERY_STRING}
RewriteRule ^widget/config/([0-9]+) widget.php?r=config/$1&%{QUERY_STRING}

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

Now you can see the forum urls are showing /forum after the url. How to remove that/forum from the urls?

Lynne
11-30-2013, 03:24 PM
What do you have entered in AdminCP > Settings > Options > Site Name/URL/etc > Forum Component URL ?

saini1987
11-30-2013, 03:33 PM
its empty....