Page 1 of 1

Redirect

Posted: Thu May 12, 2011 8:38 pm
by the_obs
Hey all,
I had my cms at the root of my web directory (domain.com) and now I moved it to a cms folder (domain.com/cms). How can I "tell" the webserver that the default page is index.php in the cms folder (i.e. default directory = domain.com/cms and default file=index.php)?

Furthermore, is it possible to redirect requests like:
domain.com/index.php?page=home
to
domain.com/cms/index.php?page=home
For people who bookmarked links?

Thanks!

Re: Redirect

Posted: Fri May 13, 2011 7:33 am
by M@rtijn
After moving the installation to a folder, you should change all references in the config.php file to point to the new folder:

Code: Select all

$config['root_url']
$config['root_path']
$config['previews_path']
$config['uploads_path']
$config['image_uploads_path']
Also, you should edit the .htaccess file to suit the new path:

Code: Select all

#Sub-dir e.g: /cmsms
RewriteBase /cms
As for your second question.

In the .htaccess you can redirect your pages to the new url:

Code: Select all

RewriteRule ^index.php?page=home?$ http://www.domain.com/cms/index.php?page=home [R=301,L]