Page 1 of 1

[solved] Blogs address not working after activating mod-write and nice URLs

Posted: Sun Jan 17, 2010 10:28 pm
by Carl
Hello,

after searching this blog and checking some similar sounding acticles I do not find a solution to my problem.

I'm using CMS 1.6.6 and
Blogs
0.3.3.1


After changing page extension to / and implementing .htaccess all except the blog works fine.

The blog adress is generated to:
http://www.48er-......./buergerinitiative/themenschwerpunkte/test/index.php?mact=Blogs,m99cd5,showcategory,1&m99cd5returnid=73&m99cd5catid=Themen

instead of
http://www.48..../index.php?mact=Blogs, ... tid=Themen

(/buergerinitiative/themenschwerpunkte/test/  is wrongly inserted.)

I assume the content of .htaccess is wrong.


Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ index.php?page=$1 [QSA]



Can anybody give some hint?
Thanks,
Carl

Re: Blogs address not working after activating mod-write and nice URLs

Posted: Mon Jan 18, 2010 8:46 am
by kurashiki_ben
can you have a look at the part of your config.php file that relates to URL Settings.
it should be something like:

Code: Select all

  #------------
  #URL Settings
  #------------

  #What type of URL rewriting should we be using for pretty URLs?  Valid options are:
  #'none', 'internal', and 'mod_rewrite'.  'internal' will not work with IIS some CGI
  #configurations. 'mod_rewrite' requires proper apache configuration, a valid
  #.htaccess file and most likely {metadata} in your page templates.  
  $config['url_rewriting'] = 'mod_rewrite';

  #Extension to use if you're using mod_rewrite for pretty URLs.
  $config['page_extension'] = '/';   [color=red]<== Check this part [/color]

  #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';
also have a look at the wiki:
http://wiki.cmsmadesimple.org/index.php ... ty_URL.27s

Re: Blogs address not working after activating mod-write and nice URLs

Posted: Mon Jan 18, 2010 7:26 pm
by Carl
Thanks.

I found the problem.

The config setting
  $config['use_hierarchy'] = true;

has to be changed to

  $config['use_hierarchy'] = false;
.

Now it is working.

Re: Blogs address not working after activating mod-write and nice URLs

Posted: Fri Jan 29, 2010 10:37 am
by kurashiki_ben
great.
please add [solved] before subject line