Redirect

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
the_obs
Forum Members
Forum Members
Posts: 29
Joined: Wed May 05, 2010 10:49 am

Redirect

Post 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!
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: Redirect

Post 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]
Make your community a better place!
Locked

Return to “[locked] Installation, Setup and Upgrade”