WebSite X5Help Center

 
Arnold Page
Arnold Page
User

Standalone blog - or blog as home page  en

Autor: Arnold Page
Visited 2650, Followers 1, Udostępniony 0  

Is it possible to create either a standalone blog - a website that has only a blog page - or else to set the blog page as the home page so that it is the first page visitors see when they type the main website address. I know I can bring the blog page up first by providing visitors with the subdirectory url, but I'd really like to make a website with just the blog page on it.

My current blog website is www.naturalhealthdiet.uk.

Posted on the
19 ODPOWIEDZI - 5 USEFUL - 1 PRAWIDłOWA ODPOWIEDź
Arnold Page
Arnold Page
User
Autor

Thanks Paul, I missed that one. The link https://my.bluehost.com/cgi/help/2224 seemed to be the answer. However I followed the instructions and wrote an htaccess text file which I saved as "htaccess.txt", but when I tried to rename it as ".htaccess" a message said, "You must type a file name."

Czytaj więcej
Posted on the from Arnold Page
Paul M.
Paul M.
Moderator
Arnold Page
...but when I tried to rename it as ".htaccess" a message said, "You must type a file name."

Did you get that message in Windows?  I expect so...

Try creating a plain text file in Windows, then uploading it to your server using an FTP client like FileZilla:

https://filezilla-project.org/

Once you have the file on your server you will find working with it a lot easier...  FileZilla allows you to rename any file with ease simply by right-clicking on it.

In fact, you could even skip the first step and simply create the file directly on the server (with the correct filename) using FileZilla alone.

A good FTP client is invaluable.

All the best!

Czytaj więcej
Posted on the from Paul M.
Arnold Page
Arnold Page
User
Autor

Windows, of course. Excellent so far...  I do use FileZilla and I was able to install the .htaccess file named properly as you recommended. I wrote in it "DirectoryIndex blog/index.php" and on entering the main website url lthe blog page appeared! Magic.

Unfortunately it did not display the right-hand column which shows Recent Posts, Archives and Links. These were shown instead at the foot of the page in text form. By clicking on the Recipes page tab and then returning to the Blog page tab they appeared properly. This behaviour was duplicated in a different browser.

Czytaj więcej
Posted on the from Arnold Page
Arnold Page
Arnold Page
User
Autor

Another problem appears to be related. Now when I enter http://www.naturalhealthdiet.uk/admin instead of getting the admin login screen I get a list of the files headed "Index of /admin". When I deleted the .htaccess file the admin login screen appeared correctly.

Czytaj więcej
Posted on the from Arnold Page
Arnold Page
Arnold Page
User
Autor

I can get the admin login screen by entering "/admin/index.php", so that's ok, but it doesn't solve the problem with the Recent Posts, etc., not displaying initially.

Czytaj więcej
Posted on the from Arnold Page
Arnold Page
Arnold Page
User
Autor

I've currently deleted the htaccess file to allow my family to find the blog when they enter the url with "/blog", so you won't be able to test what I've said above about Recent Posts. I can put it back if you want me to.

Czytaj więcej
Posted on the from Arnold Page
Paul M.
Paul M.
Moderator
Arnold Page
Another problem appears to be related. Now when I enter http://www.naturalhealthdiet.uk/admin instead of getting the admin login screen I get a list of the files headed "Index of /admin". When I deleted the .htaccess file the admin login screen appeared correctly.

Please add the following line to your new .htaccess file, which will switch off directory listing:

Options -Indexes

Czytaj więcej
Posted on the from Paul M.
Arnold Page
Arnold Page
User
Autor

Hi Paul. I amended the .htaccess file to say

DirectoryIndex blog/index.php
Options -Indexes

Then when I entered the main url www.naturalhealthdiet.uk/admin I received the message: Error 403: "You don't have permission to access /admin/ on this server."

Also it didn't solve the problem with not displaying the Recent Posts boxes, which you probably hadn't expected it to do anyway.

Czytaj więcej
Posted on the from Arnold Page
Paul M.
Paul M.
Moderator
Arnold Page
...when I entered the main url www.naturalhealthdiet.uk/admin I received the message: Error 403: "You don't have permission to access /admin/ on this server."

You need to enter the full qualified URL which is:

http://www.naturalhealthdiet.uk/admin/login.php

as opposed to:

http://www.naturalhealthdiet.uk/admin/

The latter will not allow you access precisely because we have asked it not to by disabling directory listings...  in other words if there is not an index file in the directory specified (in this case 'admin') then access will be denied.

Hope that makes it a bit clearer.

You definitely want to keep directory listings switched off if possible, from a security point of view...  it's very good practice.

But switch it off in individual directories if necessary, as opposed to globally on the entire site.

Arnold Page

Unfortunately it did not display the right-hand column which shows Recent Posts, Archives and Links. These were shown instead at the foot of the page in text form. By clicking on the Recipes page tab and then returning to the Blog page tab they appeared properly. This behaviour was duplicated in a different browser.

This sounds like a simple and localised browser cache issue.  Please try clearing your browser caches (both browsers) and then testing again.

Alternatively please reinstate the htaccess file so that we can take a look for ourselves.

Many thanks!

Czytaj więcej
Posted on the from Paul M.
Arnold Page
Arnold Page
User
Autor

Hi Paul. I deleted the  both browsers but no change, so I've reinstated the .htaccess file, and once again on entering www.naturalhealthdiet.uk the blog page comes up first, as desired, but without showing the side boxes. I'll leave it like that until you can get back to me. Thanks.

Czytaj więcej
Posted on the from Arnold Page
Paul M.
Paul M.
Moderator

Thanks for reinstating the htaccess file, Arnold.

I see exactly what you mean now.  It's not just the side bar which is in the wrong place...  if you look carefully there are other differences too, and I'm 99% sure that this is because the correct CSS files are no longer linked to the blog page on account of the Directory Index instruction.

This is because the blog is one folder down from root on your server, and the links to the relevant CSS files are relative links as opposed to absolute ones...  I'm pretty certain we will need to add some additional lines to the htaccess file to ensure that the CSS (styling) for the blog can be found.

Please leave this with me for the time being and I will do my best to find the correct code for your needs.  I will be in touch!

Czytaj więcej
Posted on the from Paul M.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

Hello, sorry, I do not speak English (translated by Google)...
... Try to enter in the Properties pane / Expert HEAD (/HEAD) section BLOG the following code:
<link rel="stylesheet" type="text/css" href="http://www.naturalhealthdiet.uk/blog/style.css" />

Greetings

..................................

... [IT] ... ciao a tutti, scusate, non parlo Inglese (tradotto da Google)..
... provare ad inserire nel pannello delle Proprietà / Esperto sezione HEAD (/HEAD) del BLOG il seguente codice:

<link rel="stylesheet" type="text/css" href="http://www.naturalhealthdiet.uk/blog/style.css" />

saluti

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪
Arnold Page
Arnold Page
User
Autor

Grazie. I tried putting that code into the blog page and into the recipe page separately, but neither worked. I also tried it in both at once!

When I select the blog tag from the recipe page it displays correctly. Does give any clue?

Czytaj więcej
Posted on the from Arnold Page
Arnold Page
Arnold Page
User
Autor

When I select the blog tag from the recipe page the browser address window says www.naturalhealthdiet.uk/blog/index.php and then it works all right.

Czytaj więcej
Posted on the from Arnold Page
Paul M.
Paul M.
Moderator

Hello Arnold,

Please just give me a little time to work on this...  I do not have the necessary time right now, but I hope to send you a solution as soon as possible involving additional lines in the htaccess file.

Czytaj więcej
Posted on the from Paul M.
Arnold Page
Arnold Page
User
Autor

Just to confirm, the .htaccess file is in the  main foodblog folder, and it says DirectoryIndex blog/index.php
Options -Indexes

Czytaj więcej
Posted on the from Arnold Page
Paul M.
Paul M.
Moderator

I've now had some time to look at this in more depth, Arnold, and I can confirm that the solution provided by KolAsim not only works, but is (in my opinion) more streamlined and elegant than using extra rules in the htaccess file.

You will need to insert the code exactly as KolAsim specified:

i.e. before closing the HEAD tag in the Properties section of the Blog page (see the screenshot attached)

The reason it is not working for you at the moment is that you have not included the opening and closing tags in the HTML:

<link rel="stylesheet" type="text/css" href="http://www.naturalhealthdiet.uk/blog/style.css" />

...is correct

link rel="stylesheet" type="text/css" href="http://www.naturalhealthdiet.uk/blog/style.css"

...is incorrect!

I've given credit to KolAsim for his input, many thanks!  I can't think of an easier or better way to go about things  

Let us know how you get on, Arnold.

Czytaj więcej
Posted on the from Paul M.
Arnold Page
Arnold Page
User
Autor

Hi Paul. You were quite correct. I omitted the "<" and the ">". Obviously I wasn't concentrating on the fact that it was HTML we were writing - when I learned SQL the book used "<" and ">" like quotation marks. The web site now works fine and the blog appears like the main page. Thanks KolAsim!

I still think it would be nice if in some future edition an option to make a simple standalone blog could be included.

Czytaj więcej
Posted on the from Arnold Page