1 davidnewcomb Mar 06, 2018 18:00
3 davidnewcomb Mar 07, 2018 05:50
Well I made the changes and the default flag switched to Main, however it broke the site completely. The blog and the main page just displayed the attached image. I switched it back to MrN as the default collection and the blog appeared as normal and the / just redirected to the blog.
So I totally blew away everything and started again from my 5.0.9 database and tried again with the minimum amount of changes to try and get what I wanted. Upgraded it as before. Added the front page, changed the url so that home is baseurl / and blog is /blog/ and now both urls redirect to the front page and it is impossible to get to the blog section.
From the dashbaord everything looks ok. I switched on debug but when I go to /blog/?debug=blar it redirects to / and so all the debug information is about / instead of telling me why it has decided that /blog/ is being redirected to /.
I noticed there is a Log_noop, is there a Log_append_to_file or something that can tell me what is going on? If not how can I add my own implementation of Log to the configuration?
And what software did you use to add the red boxes and arrows in your screen shots, please?
4 achillis Mar 07, 2018 07:39
Okay....
Step 1)
Ensure your Collections > YOUR_COLLECTION_NAME > Settings > URLs > Collection base URL
is set to Default collection in index.php
IMPORTANT Check this for ALL other collections :
Collections > YOUR_COLLECTIONNAME1 > Settings > URLs > Collection base URLis set to
Default collection in index.php
Collections > YOUR_COLLECTIONNAME2 > Settings > URLs > Collection base URLis set to
Default collection in index.php
Step 2)
Set Default collection Site > Site Settings > Default Collections
Step 3)
Ensure your .htaccess file is standard / correct
also ensure your base url is defined correctly: conf/_basic_config.php $baseurl = ?
Step 4)
Clear your BLOG CACHE
System > Maintenance > Tools > Cache management
Step 5)
Clear your BROWSER CACHE
Step 6)
Try again
5 davidnewcomb Mar 08, 2018 18:30
Due to reinstalling multiple times I had forgotten to update the .htaccess file (on this occasion) but hadn't when I originally asked for help. So thanks for the check list to catch that one. My Dashboard now shows /index.php for Home and /index.php?blog=3 for my blog collection.
Once I was in the right place, I started to try and get my Home front page to be at / and my Blog to appear at /blog/. My aim was to get a WordPress style urls for my home collection (eg //host/welcome-to-my-site) and keep my blog in line with the previous generation of my site (//host/blog/2018/03/08/article-title). As soon as I changed the URL for the blog to be custom (Relative to baseurl:http://bigsoft.example.com/ [ blog/ ]) it redirected back to home. Tried playing with the .htaccess/RewriteBase settings but nothing worked. It felt like it was trying to match /blog/ with a post from the Home collection, not finding one and defaulting to index.php for the Home collection.
I changed the URL for my blog to "Extra path on baseurl http://bigsoft.example.com/mrn/ (Requires mod_rewrite)" and that worked. In fact practically all other options worked (/index.php/mrn/ etc). So I renamed my collection to be "blog". I'm not sure why it wasn't working but I have achieved the urls I want so I'm back on track.
Thank you for your help and the excellent pictures.
Site > Site Settings > Default Collections
Display something specific? See screenshot 2