[Solved] How to force domain to have /home.html
[Solved] How to force domain to have /home.html
When the site first loads I need to go to domain.com/home.html also for the link created by the menu manager.
Any ideas besides setting up the initial page as a redirect ?
Any ideas besides setting up the initial page as a redirect ?
Last edited by applejack on Fri Apr 19, 2013 3:50 pm, edited 1 time in total.
Re: How to force domain to have /home.html
Create an empty page as "CMSMS startpage" and add this to your .htaccess
Code: Select all
RedirectPermanent / http://www.domain.com/home.html
Re: How to force domain to have /home.html
Doesn't work goes into an infinite loop.
Re: How to force domain to have /home.html
Set the default landing page as an internal link to "home" and not in menu
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: How to force domain to have /home.html
Tried it doesn't work. If you set a page to a redirecting link in the pages screen you cannot set it as the default. I tried making it a content page then set as default then changed to redirecting page but still no go.Rolf wrote:Set the default landing page as an internal link to "home" and not in menu
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: How to force domain to have /home.html
zet in je .htaccess
Code: Select all
DirectoryIndex home.html
Re: How to force domain to have /home.html
Nope... goes to an Apache test page.staartmees wrote:zet in je .htaccessCode: Select all
DirectoryIndex home.html
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: How to force domain to have /home.html
you do have a page home.html with some text on your site?
Re: How to force domain to have /home.html
Yes. Doesn't DirectoryIndex mean the initial directory for the virtual server rather that a file ? Which presumably is why it went to a Apache page as there is no such folder.staartmees wrote:you do have a page home.html with some text on your site?
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: How to force domain to have /home.html
All that does is tell Apache to first look for those types of files with those names it doesn't force it to show home.html in the address bar.
Re: How to force domain to have /home.html
Found it
RewriteCond %{DOCUMENT_ROOT}/index.html !-f
RewriteRule ^$ %{REQUEST_URI}home.html [R=301,L]
P.S. If you need to have home.html in the address bar if clicking on a home link then you also need to set up another page i.e. start, set that as the default and untick show in menu as otherwise clicking home the url shows as /
P.P.S. The reason for doing this is that I am doing a site using jQuery UI Mobile which loads content via ajax and so to it home.html and / are not the same.
RewriteCond %{DOCUMENT_ROOT}/index.html !-f
RewriteRule ^$ %{REQUEST_URI}home.html [R=301,L]
P.S. If you need to have home.html in the address bar if clicking on a home link then you also need to set up another page i.e. start, set that as the default and untick show in menu as otherwise clicking home the url shows as /
P.P.S. The reason for doing this is that I am doing a site using jQuery UI Mobile which loads content via ajax and so to it home.html and / are not the same.