Page 1 of 1

Static page as the default "front page"?

Posted: Tue Apr 05, 2005 6:24 pm
by Marcel
I'm just finishing my new website, based on S9Y and using a couple of static pages (with the static page plugin).

Almost everything is fine now ... almost!

Before I explain - it would be best to view the website:
http://widmerconsulting.ch

As you can see:
a) on the right side is the "normal" weblog menu
b) on the left side is the menu with static pages (using RewriteRules in .htaccess)
c) even a (static) page home.html works fine (with a click on "Home")

The only thing I don't catch on is:
If somebody is entering http://widmerconsulting.ch (or http://widmerconsulting.ch/index.php) there will the standard S9Y "front page" be displayed (because this is the "front page" from a S9Y point of view).
What I want to have is the (static) page home.html to be displayed as the default "front page", when a user comes to the website. With other words: the website should act as if the user would have clicked on the "Home" menu link.

(I hope I made it to explain ... :roll: )

Thanks a lot for your help!
Marcel

Posted: Tue Apr 05, 2005 7:12 pm
by n2ition
can you redirect via your webhosts control panel to point all traffic from http://widmerconsulting.ch to http://widmerconsulting.ch/home.html. That's what I did so that I could leave the s9y application in it's own sub-folder but still give people the shorter url.

my domain is http://n2ition.com and typing it that way gets redirected to http://n2ition.com/serendipity/. I'm not a developer so this may not be the best way but it was an easy fix for me.

Posted: Thu Apr 07, 2005 5:51 pm
by Marcel
Thanks for your reply. But I don't want to put the blog part in a subdirectory - it should all be in the root.

No idea how to solve the problem? Garvin? Anybody else?

Posted: Thu Apr 07, 2005 6:19 pm
by n2ition
The same concept should still apply. All you need to do is have your domain rounted to the specific file name. If your webhost uses cpanel you can just go under "REDIRETS" and specify where to point the domain. Tell it to point from www.yoursite.com to www.yoursite.com/staticpage.html

Posted: Fri Apr 08, 2005 9:32 am
by Marcel
I'm not a developer
Me neither! Let's be proud - we've found a solution anyway :wink:
can you redirect via your webhosts control panel to point ...
I didn't understand it right away. But then I googled and found this:
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html

And after a couple of trials I got by! :D

In my .htaccess now is the following:

Code: Select all

[...]
RedirectMatch ^/$ http://www.widmerconsulting.ch/home.html
RewriteEngine On
RewriteRule (.*)\.html$ /index.php?serendipity[subpage]=$1 [L,QSA]
[...]
Which means:
1. URL / will be redirected to http://www.widmerconsulting.ch/home.html
2. home.html (which is a static page/"virtual address") will be rewritten to
http://www.widmerconsulting.ch/index.ph ... page]=home

And now - everything works just perfect!

Thanks for your help, n2ition! :)