WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 R24 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • FrontEndLogin Script - keep visitors and google away when building your site
  • Print
Pages: [1]   Go Down

Author Topic: FrontEndLogin Script - keep visitors and google away when building your site  (Read 12320 times)

Offline sky writer

  • Posts: 926
FrontEndLogin Script - keep visitors and google away when building your site
« on: July 07, 2015, 06:30:46 AM »
Ruud created a great script featured here - http://wbhelp.org/tips-and-tricks/2014/keep-visitors-and-google-away-when-you-are-building-your-website/

I've used it on many sites and it really helps with the proofing process with clients.  I have noticed that after I successfully enter the password and see the site, I am met with the password screen again when I click on a menu item.  It's never bothered me, but I have a client who has become annoyed with constantly having to enter the password twice each time he reviews the site.  I know, what a hardship this must be.  But he has asked if this can be fixed.  I really don't know what might be causing the behaviour.

If Ruud or anyone else could give a suggestion, it would be greatly appreciated.
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: FrontEndLogin Script - keep visitors and google away when building your site
« Reply #1 on: July 07, 2015, 10:21:53 AM »
Maybe it is like this:

A successfull login is kept by storing a value in a session variable.
If you login in domain.tld and the menu is pointing to www.domain.tld it will ask the question again because a new session is created.

If this is the case, you can force the visitor to go to www.domain.tld by using a few .htaccess lines:
(if you are using shorturl put it above the shorturl lines)
Code: [Select]
RewriteEngine On
# rewrite host to include www
RewriteCond %{HTTP_HOST} !^www\.               [NC]
RewriteCond %{HTTP_HOST} ^([^.]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$       http://www.%1/$1      [R=301,L]
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • FrontEndLogin Script - keep visitors and google away when building your site
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2