Page 1 of 1

[SOLVED] change homepage URL

Posted: Mon Jun 29, 2009 9:58 am
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

Re: change homepage URL

Posted: Mon Jun 29, 2009 10:57 am
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.

Re: change homepage URL

Posted: Mon Jun 29, 2009 12:46 pm
by jocando
Thanks for replying, but I'm not sure exactly where to do this.  What 'page screen'?

Jo

Re: change homepage URL

Posted: Mon Jun 29, 2009 12:56 pm
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..

Re: change homepage URL

Posted: Mon Jun 29, 2009 12:59 pm
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

Re: [SOLVED] change homepage URL

Posted: Thu Jul 02, 2009 11:42 am
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.

Re: [SOLVED] change homepage URL

Posted: Fri Jul 03, 2009 6:21 am
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?

Re: [SOLVED] change homepage URL

Posted: Mon Jul 06, 2009 3:47 pm
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.