[SOLVED] change homepage URL

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
jocando
Forum Members
Forum Members
Posts: 50
Joined: Thu Feb 19, 2009 4:20 pm

[SOLVED] change homepage URL

Post by jocando »

Hi

This seems like a simple question, but I'm not sure where to find the answer.

While I'm working on my CMSMS site, I've got a holding page (index.html).  Trouble is, when I'm using the CMSMS site, the home page links to this holding page, NOT the index.php page.  ie 'Home' links to the root (www.domain.com/) not the index.php page.

How can I change this?  I want to be able to show the site to other people before I make it live, and I'd like it to work smoothly.

Many thanks
Jo
Last edited by jocando on Mon Jun 29, 2009 12:59 pm, edited 1 time in total.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: change homepage URL

Post by Jeff »

On your page screen change your default page to a page that you don't use.

The CMSMS system automatically puts the default page as 'yourdomain.com/' if you don't want that then add a blank page that you don't use (doesn't show in the menus) and set it to be the default.
jocando
Forum Members
Forum Members
Posts: 50
Joined: Thu Feb 19, 2009 4:20 pm

Re: change homepage URL

Post by jocando »

Thanks for replying, but I'm not sure exactly where to do this.  What 'page screen'?

Jo
Connie

Re: change homepage URL

Post by Connie »

your problem is that your server calls index-files in a defined sequence when no page is called...
so your homelink which points to the root of your CMSMS directory opens that index.htm there

you can change the sequence of index-file-types in the .htaccess file:

Code: Select all

DirectoryIndex index.php index.htm index.html
if given in that way, first index.php will be loaded if exists, second index.htm if index.php does not exist.. 




sorry... this posting is not the right answer to your problem..
Last edited by Connie on Mon Jun 29, 2009 12:59 pm, edited 1 time in total.
jocando
Forum Members
Forum Members
Posts: 50
Joined: Thu Feb 19, 2009 4:20 pm

Re: change homepage URL

Post by jocando »

Many thanks.  I'll try that.
I also now understand the workaround from ajprog and have got that working as well.

Thanks to all!
Jo
Pierre M.

Re: [SOLVED] change homepage URL

Post by Pierre M. »

Hello,

May I add my recipe ?

1-I create a page to be the homepage (set it as the default like ajprog) and call it (alias) 'index'.
2-I use a '.html' extension, with hierarchy like /some/path/to/a/page.html hence the homepage is /index.html (academic, isn't it?)
3-I use the opposite of Connie's DirIdx : DirectoryIndex index.html index.php
4-I use a .htaccess at the root to 302 redirect / to /index.html

This way :
1-When I temporary put a index.html static file at the root it is served as the homepage (maintenance or hacking convinience).
2-When I use CMSms alone (no static html file) the homepage is still /index.html (url stability)
3-Audience to homepage is measured as hits to /index.html (domain.tld/ alone doesn't matter) in all cases.

Pierre M.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: [SOLVED] change homepage URL

Post by Jeff »

Pierre M. wrote: 4-I use a .htaccess at the root to 302 redirect / to /index.html
Pierre,

For those of us (like me) that only copy and paste to the .htaccess file. Can you paste the code for your 302 redirect?
Pierre M.

Re: [SOLVED] change homepage URL

Post by Pierre M. »

Hello again,

try something like :

Code: Select all

RewriteEngine on
RewriteBase /
RewriteRule ^$ index.html [R=302,L]
But test and tune. This is very basic. Simple "copy and paste" is unwarrantied.
Have fun with CMSms

Pierre M.
Locked

Return to “CMSMS Core”