Forum and Pretty URL's problem.

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Dabnis
Forum Members
Forum Members
Posts: 17
Joined: Thu Jun 25, 2009 12:09 pm
Location: Nottingham UK

Forum and Pretty URL's problem.

Post by Dabnis »

Hi All,
I have the following problem:
I have implemented the forum module within a site that I'm working on and it is (was working) fine up until I changed to Prety URL's via mod_rewrite.
The issue:
Before using pretty url's when clicking on a topic, all posts would be displayed within a new page. Now with pretty url's working the topic & posts appear within the same content area as the topic/forum lists, pushing everything else down the page.

The .htaccess file:
php_value session_save_path "tmp/cache"

php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag session.use_trans_sid Off

Options -Indexes
ServerSignature Off
Options +FollowSymLinks

RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
The config File (relevant section):
$config['url_rewriting'] = 'mod_rewrite';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '';

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
I have attached a screen grab of the effect.

The only other strange symtem is that when browsing forum topics etc I get url's of the form: domain.co.uk/forum/forum/forum/1/87 . The triple forum inclusion seems strange!

The attached screen grabs show forum with & without pretty url's enabled.

Any help / suggestions appreciated.
Attachments
ScreenHunter_04 Sep. 01 11.44.gif
ScreenHunter_03 Sep. 01 11.43.gif
ScreenHunter_02 Sep. 01 11.42.gif
ScreenHunter_01 Sep. 01 11.39.gif
As black can not exist without white, a problem can not exist without its solution
Post Reply

Return to “Modules/Add-Ons”