We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Sign In page as index version 1.6 - guide | Forum

dave Team
dave Feb 12 '14
Over time there have been several articles of how to make the sign in page your index.   Meaning that when a visitor first visitor your site, the default page that they get is the sign in page which looks something like this. 





Well i had my site set up the same way, and i am quite positive that i checked and verified that all the process including the guest only pages when i set that up and it worked fine. 


However for some reason something has changed with regard to running that same process on 1.6 and rather than try to figure out what exactly changed, i thought it better to just go over how to recover and make it work again for those of us that use the same setup. 


Issue:  If you had your site set up with the sign-on page as the index page on 1.53, after updating to 1.6 you find that all of your guest pages go right to the sign-on page rather than to the guest page.  


Issue Example: FAQ page should take you to the FAQ page when you are a guest but instead now it takes you to the sign-on page.  And the same with all your guest pages. 


Discovery:  I discovered that it is a either or situation.  If you set your permissions in admin (guests can view) to NO, then all of your guest pages will go to the sign-in page now when you click on them.  However if you set (guest can view) to YES then you get the actually index page and not the sign-in page by default.  So it appears you cant have it both ways out of the box anymore.  


Fix and setup:  Here we will not only go over the fix for this issue but also the setup process (as best i remember it because i am not doing it all again sorry).  And if i miss something we can add it to this post. 


If you already had your site setup like this on 1.53 then you need to go through this again anyway because there are some things that the update sets back to default so rather then have two different processes here i will just start from the beginning and go through it. 


So lets get started. 


Setting up sign-in as index for version 1.6


1. Go to your admin pages and make sure all your pages in all sections (main menu, bottom menu, hidden pages) have been edited appropriately regarding viewable by guest and or registered members. 


2. Make sure under admin privacy and permissions that "Guests can view the site"  is set to YES.   (on 1.53 this was NO but we need to change this now for 1.6)  If you leave this as no, every footer link you have (not signed in) will go to the signon page and not the page you want.


   2a.   This will cause guests to now be able to view the main page of your site so lets go take care of that right now before they see too much (or you can do step 3 first and then do step 2 if you are that worried about it)


3. Go to users side and go to the main page and click "customize this page". 

   

   3a.  Now click on the little gear symbol for ever one of your widgets. You will do this for ever single widget on this page. 


   3b.  Put a checkmark in "Restrict View".


   3c.  Put a checkmark in everything except Guest, do not check Guest.  But all of your other roles you want to see this item put a checkmark in.  And then save each widget. 


 When you are all done with this and you fresh your page (www.yoursite.com), you should be looking at an empty page, other than possibly the header image and the sign in and sign up buttons, if not then you missed a widget. 


4.  Now for the good part.  Now we need to tell the system that if anyone goes to this page www.yoursite.com that you want them to be redirected to the sign-in page instead. 


  4a.  So open up your .htaccess file in your oxwall site root and  find the rewrite section that should exist with all oxwall sites.  You want to put the following code AFTER any oxwall required rewrite rules.


So to be clear this code should be after everything else on the page (other than for deny ip's section this should be the last thing executed.  And then any deny ip should be listed if you have them in there. 


so.. example 


oxwall rewrite stuff 


This code.... 


deny ip list (if you have them) 


here is the code..  Replace yoursite.com with your domain name. 


NOTE:  i am not a rewrite expert, i did what anyone else does is i put this together by pulling google resources and doing some reading regarding rewrites, so if anyone out there is a rewrite guru and has a better way or if you see this will conflict with something please post and let us know. 




#used to send everything from main index to the sign in page

Options +FollowSymLinks

RewriteEngine 

OnRewriteCond %{HTTP_HOST} ^www.yoursite.com$   [NC]

RewriteCond %{REQUEST_URI} ^/$

RewriteRule ^(.*)$ http://yoursite.com/sign-in   [R=301,L]



That should do it, now when you go to yoursite.com you should get the sign in page and then click register and then click on one of the guest pages below and it should work.. 


Enjoy and good job :)



The Forum post is edited by dave Jul 12 '14
dave Team
dave Feb 14 '14
Just a quick note here.. I did just test that rewrite i did above in 4 ways. 


www.site.com

http://www.site.com

http://site.com

site.com


and all 4 ways went to the sign in page... just fyi... so it looks like its solid. 

dave Team
dave Feb 14 '14
Also understand that if you do this (especially if you use the rewrite) then your opening page will be dashboard instead of main.  Meaning that after someone logs in, they will go to dashboard instead of main. 


It is all how important having the signon page as the index is to you.  


You have to ask yourself is it worth a small inconvienence to have the first page they come to the dashboard in order to have my signon as my index.  Or do i just have some text on the index (not signed on) and have them click the signon button in order to keep my first page the main. 


This is all because of the way oxwall itself rewrites the index both in htaccess and in the files. 


 

dave Team
dave Feb 14 '14
Well basically here is what i have come up with so far..  www.anorexiadating.com   Basically what i did was i turned off all guest views which pretty much left a blank page (not signed in)  then as admin i used customize this page on the main page and added a custom html block to the top of the main page which has all the text and buttons and stuff, and only viewable by guests. Which is the welcome page you see (not signed in). 


Although this is somewhat similar to the splashscreen page in usage, i did not like how the splash screen popped up all the time out of the blue for members while logged on so at least this way that wont happen because im not using the splashscreen. 


I am now trying to figureout how to make the buttons i made on my page act the same as the console buttons on the top  but i cant use  {component class='BASE_CMP_Console'} in the custom html it wont parse. 


The issue is that if someone uses the console buttons to sign in, it goes to the main page... But if they use one of my buttons it goes to dashboard page as first page.   The difference being that the console executes ajax to process it from mysite.com  so when it loads the main is set as the index so it loads main.  But my button signs in from /sign-in  which means that the index wont load so it has to load sort order page 2 which is dashboard. 


Anyone know how to set some html to load the console buttons instead of my buttons or redirect effectively.. 


also remember to use target="_self" on all your links in your custom html, so you dont open a new page, it does make a difference. 

The Forum post is edited by dave Feb 15 '14
tammy harris
tammy harris Feb 15 '14
dave an easy way is to drag the join page to first position in admin edit pages $ menus makes it the landing page ?
dave Team
dave Feb 15 '14
Ok tammy thanks ill play around with that and see what happens doing it that way as well, thanks 
dave Team
dave Feb 15 '14
Looks like there might be a plugin also that does something like this. I do not have this plugin so i cannot say it has been tested by me, purchase at your own risk.   I say this because it does look like this just mods the current process, in other words it looks like this just changes the display of what you already have. It does not look like it actually makes it the index, so just be careful. 


http://www.oxwall.org/store/item/601

The Forum post is edited by dave Feb 15 '14
dave Team
dave Feb 15 '14
Tammy i did that on another test site and that just makes the join page as the index which is good if that is what you want, but we want the sign in page to be the index.  :)  good tip though
tammy harris
tammy harris Feb 17 '14
dave i am play around with arons start page pro plugin thing and is cool but full of bad spelling and other things and like most plugins here only just half works took me hours to make it anywhere near usable a bit of work by the developer and this could be a great plugin
its a much better seo wise then using signin page 

Matt
Matt Mar 31 '14
i agree the star page pro plugin is good but it needs some works still. i would like to see the login and signup on the same page. this would make it a a lot cleaner and user friendly the more page redirects the more likely a user leaves the page. 


most social network pages that i use daily have this feature to where both login and signup are on the same page if you are a guest. if the plugin creator could do that or even if the oxwall devs could that would be awesome!

omer
omer Oct 28 '15
my httacses 1.8


RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} !/ow_updates/index\.php
RewriteCond %{REQUEST_URI} !/ow_updates/
RewriteCond %{REQUEST_URI} !/ow_cron/run\.php
RewriteCond %{REQUEST_URI} !/e500\.php
#RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php

RewriteCond %{HTTP_HOST} ^yetelike\.com$ [OR]RewriteCond %{HTTP_HOST} ^www\.yetelike\.com$RewriteRule ^/?$ "http\:\/\/yetelike\.com\/sign\-in\/" [R=301,L]



how should be?

Vladimir Bobak
Vladimir Bobak Feb 18 '17

ox,verzion: 1.8.4

mY SITE: ROBIKA.SK


I can not set the sign-in(landing page) page as your head! 

I tried the above. Is not working!


Help anyone?

The Forum post is edited by Vladimir Bobak Feb 19 '17