redirect?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
firfelin

redirect?

Post by firfelin »

Hi,

I have some problems with redirection, htaccess and all this esoteric stuff... ;)

I installed cmsms in a subdirectory (http://www.magdalenagerber.ch/mg) and now the site is finished and I would like to redirect http://www.magdalenagerber.ch to this subdirectory...

I sounds easy, but I have no clue how to do that

Thanks in advance for you help.
cyberman

Re: redirect?

Post by cyberman »

Try this

1. Enable  enable assume_mod_rewrite in config.php
2. Create a file named .htaccess.
3. Put this inside

Code: Select all

RewriteEngine On

RewriteCond %{HTTP_HOST} = www.yourdomain.com
RewriteRule ^(*.)$  /yoursubfolder/$1 [L]
4. Move this file to your domain root
firfelin

Re: redirect?

Post by firfelin »

Thank you for your help. I was enthousiast, it sounds clear, simple; but it doesnt work...

So far I have this:

Code: Select all

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

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

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

#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';

I use the multilangue version of cms (1.0.2 mle build 4) and as soon as I change the mod_rewrite

Code: Select all

$config['assume_mod_rewrite'] = true;
it makes clean nice pretty URLs like http://www.magdalenagerber.ch/mg/fr/tellerstories instead of http://www.magdalenagerber.ch/mg/index. ... lerstories but returns a "Not Found" error page...
Pierre M.

Re: redirect?

Post by Pierre M. »

another try with the .htaccess in the root (/.htaccess).

Pierre M.
Locked

Return to “CMSMS Core”