Page 1 of 1
1.6.6 News module + Mod_rewrite = missed parent in morelink
Posted: Mon Oct 26, 2009 9:12 pm
by Rkz
With "none" and "internal" url rewriting everything fine.
But with mod_rewrite:
All my pages are:
mydomain.com/LT/page-name
but on news morelink:
mydomain.com/news/251/60/Post-title
/LT/ just gone? and The page was not found...
I can manually edit URL into
mydomain.com/LT/news/251/60/Post-title and now everything fine, but how to make it auto.
Any ideas?
Re: 1.6.6 News module + Mod_rewrite = missed parent in morelink
Posted: Mon Oct 26, 2009 11:56 pm
by Dr.CSS
Check config.php for hierarchy setting, news and other modules need it enabled...
Re: 1.6.6 News module + Mod_rewrite = missed parent in morelink
Posted: Tue Oct 27, 2009 6:48 am
by Rkz
its ok, here is my config:
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
I guess I have to modify my .htaccess :/
Re: 1.6.6 News module + Mod_rewrite = missed parent in morelink
Posted: Tue Oct 27, 2009 6:53 am
by Rolf
Your website is situated in a subfolder
Did you change in the .htaccess file:
Code: Select all
#Sub-dir e.g: /cmsms
RewriteBase /
into:
Code: Select all
#Sub-dir e.g: /cmsms
RewriteBase /LT
Regards Rolf :)
Re: 1.6.6 News module + Mod_rewrite = missed parent in morelink
Posted: Tue Oct 27, 2009 8:15 am
by Rkz
no there are no folders, it is becouse of language menu tree /LT/ and /EN/
LT
-submeniu
-submeniu
EN
-submeniu
-submeniu
Re: 1.6.6 News module + Mod_rewrite = missed parent in morelink
Posted: Tue Oct 27, 2009 8:52 pm
by Rkz
finally Id find out what to do:
in modules/news/action.default.php
there is line:
$prettyurl = 'news/'.$row['news_id'].'/'.($detailpage!=''?$detailpage:$returnid)."/$aliased_title";
so after little edit:
$prettyurl = 'LT/news/'.$row['news_id'].'/'.($detailpage!=''?$detailpage:$returnid)."/$aliased_title";
works fine, but i think that shouldnt be edited by simple user, becouse of upgrading or updating...
Re: 1.6.6 News module + Mod_rewrite = missed parent in morelink
Posted: Tue Oct 27, 2009 8:55 pm
by calguy1000
Pretty urls from the News and other modules are hard-coded from the root... this is not a bug, but a design decision.