Need help in making en_US url to show in root

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
nkaushal
Forum Members
Forum Members
Posts: 11
Joined: Tue Mar 24, 2009 4:11 pm

Need help in making en_US url to show in root

Post by nkaushal »

We are using CMS Made Simple 1.4.1 and the url structure which is showing right now is:

http://www.site.com/en_US/

Where we want it to be http://www.site.com/

Can you please help. We have mod_rewrite on and config_lang.php has define('DEFAULT_LANG', 'en_US');
User avatar
CWebguy
Forum Members
Forum Members
Posts: 139
Joined: Thu Jul 24, 2008 3:31 am

Re: Need help in making en_US url to show in root

Post by CWebguy »

Try removing en_US from config.
CMSMS Made
alby

Re: Need help in making en_US url to show in root

Post by alby »

nkaushal wrote: We are using CMS Made Simple 1.4.1 and the url structure which is showing right now is:
I suppose that you use MLE mod, right?

Alby
nkaushal
Forum Members
Forum Members
Posts: 11
Joined: Tue Mar 24, 2009 4:11 pm

Re: Need help in making en_US url to show in root

Post by nkaushal »

I am using htaccess to manage urls. Here is my config.php url settings:

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

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

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

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = false;

#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'] = false;

#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';
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Need help in making en_US url to show in root

Post by Dr.CSS »

You still didn't answer alby question, are you using the MLE edition of cmsms?...

I mean if you don't tell us what your using we can only shoot in the dark here...
nkaushal
Forum Members
Forum Members
Posts: 11
Joined: Tue Mar 24, 2009 4:11 pm

Re: Need help in making en_US url to show in root

Post by nkaushal »

How can I find it?
alby

Re: Need help in making en_US url to show in root

Post by alby »

nkaushal wrote: How can I find it?
Where and what you download CMSMS package?

Alby
nkaushal
Forum Members
Forum Members
Posts: 11
Joined: Tue Mar 24, 2009 4:11 pm

Re: Need help in making en_US url to show in root

Post by nkaushal »

Existing webmaster left and we overtook this site, so honestly speaking no idea where it was downloaded from. If you like I can post the url.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Need help in making en_US url to show in root

Post by Dr.CSS »

Oh ok, see this is why we always say the more info you can give first time the better...

Look in root do you see any files called config_lang or is there a folder called mle?...
nkaushal
Forum Members
Forum Members
Posts: 11
Joined: Tue Mar 24, 2009 4:11 pm

Re: Need help in making en_US url to show in root

Post by nkaushal »

Yes there is a folder called mle and there also is a file config_lang.php in root
alby

Re: Need help in making en_US url to show in root

Post by alby »

nkaushal wrote: Yes there is a folder called mle and there also is a file config_lang.php in root
ok, it's MLE
for that you want depend of your skill:
you must edit one php file
or
waiting new release (about 1 week) but in this case you must upgrade to new version

Alby
nkaushal
Forum Members
Forum Members
Posts: 11
Joined: Tue Mar 24, 2009 4:11 pm

Re: Need help in making en_US url to show in root

Post by nkaushal »

I will take my chance with editing php file.
Can you please help me in that?
alby

Re: Need help in making en_US url to show in root

Post by alby »

nkaushal wrote: I will take my chance with editing php file.
Can you please help me in that?

lib/classes/class.content.inc.php:
        $config = &$gCms->GetConfig();
        $url = "";
        $alias = ($this->mAlias != ''?$this->mAlias:$this->mId);

        /* use root_url for default content */
        if($this->mDefaultContent) {
//Start MLE
#$url = $config['root_url']. '/';
#return $url;
//End MLE
        }

        if ($config["assume_mod_rewrite"] && $rewrite == true)
        {
            if ($config['use_hierarchy'] == true)
uncomment two rows (drop # character in front of)

Alby
nkaushal
Forum Members
Forum Members
Posts: 11
Joined: Tue Mar 24, 2009 4:11 pm

Re: Need help in making en_US url to show in root

Post by nkaushal »

I have done the changes as mentioned below, but its still going to en_US

$config = &$gCms->GetConfig();
$url = "";
$alias = ($this->mAlias != ''?$this->mAlias:$this->mId);

/* use root_url for default content */
        if($this->mDefaultContent) {
        #$url =  $config['root_url']. '/';
#return $url;
        }

if ($config["assume_mod_rewrite"] && $rewrite == true)
{
    if ($config['use_hierarchy'] == true)
    {
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Need help in making en_US url to show in root

Post by Dr.CSS »

You missed one of the #...
Locked

Return to “[locked] CMSMS MLE fork”