WebSite X5Help Center

 
Craig K.
Craig K.
User

How to setup blog only site  en

Autor: Craig K.
Visited 1972, Followers 1, Udostępniony 0  

How do you set a site so that there is no home / index page? Instead the visitor must go straight to the blog. The reason is a second blog is required on the same site (installed on a sub domain) and I want them to select this second blog from the main menu, and once they arrive their I want them to immediately see the blog article list.

Posted on the
6 ODPOWIEDZI - 2 USEFUL - 1 PRAWIDłOWA ODPOWIEDź
Paul M.
Paul M.
Moderator

Hello Craig,

There are various ways of doing this depending on what type of server/hosting you are on?  This is not done from within WebSite X5.

Is your website running on Apache, Nginx, Windows?

Kind regards,

Paul

Search the WebSite X5 Help Center

Czytaj więcej
Posted on the from Paul M.
Craig K.
Craig K.
User
Autor

Hi Paul,

The response I got was: "Please note that all of our servers are running custom Linux version so in that sense all websites are hosted on Linux, which comes with Apache preinstalled."

Czytaj więcej
Posted on the from Craig K.
Paul M.
Paul M.
Moderator

On an Apache server this is accomplished using an .htaccess file in the server directory of the 'second blog'.  There may already be an .htaccess file present in that location...  if so it's fine to simply edit the existing one (carefully!)

You need to add the following single line to your .htaccess file:

DirectoryIndex name_of_page_showing_blog_article_list

...where the name of the page includes the file extension.  I'll try and explain further...

Under normal circumstances an Apache server will usually look for a file called index or home or similar, so by default the DirectoryIndex is set as follows:

DirectoryIndex index.html  (for example)

By defining the page which you want to serve after the DirectoryIndex instruction, you can force the server to serve that page instead of the index page...  so set it to be the blog article page.

If you need to create and upload an .htaccess file from scratch then you can use the following instructions as a guide:

How to create an .htaccess file and what it can be used for?

If you're uncertain about working with files directly on the server then I am sure your webhost will be only too happy to help.  It's best to ask for assistance if in doubt, as errors in an .htaccess file can temporarily 'break' your website until those errors have been resolved.  But if you are working with a brand new .htaccess file then you can have a little more confidence:  if your website doesn't work as a result, simply delete the entire file from the server and you will be back to where you started.

Czytaj więcej
Posted on the from Paul M.
Craig K.
Craig K.
User
Autor
Paul M.
If you set a link from a 'Level' in the Main Menu to the blog article page then you will probably be able to achieve much the same result...  did you try that without success? How to include a link to another website in the Main menu

Hi Paul,

Thanks. No I haven't, will try this first if it is easier.

Czytaj więcej
Posted on the from Craig K.
Paul M.
Paul M.
Moderator

You're welcome, Craig.  The second method is definitely easier...  I explained the DirectoryIndex procedure only because you specifically asked to bypass the home/index page.

Czytaj więcej
Posted on the from Paul M.