Mobile app version of vmapp.org
Login or Join
Sent6035632

: .htaccess - redirect if visitor is logged into google I need a .htaccess redirect rule that redirects visitors to a url only if the visitor is logged into google. I was thinking of doing it

@Sent6035632

Posted in: #Cookie #Google #Htaccess

I need a .htaccess redirect rule that redirects visitors to a url only if the visitor is logged into google.

I was thinking of doing it by looking into cookies

RewriteEngine On
RewriteCond %{REQUEST_URI} /ingoing*$
RewriteCond %{HTTP_COOKIE} !^.*GOOGLE-COOKIE.*$ [NC]
RewriteRule . example.com/outgoing [R,L]


What sting does a Google cookie only contain if a user is logged in?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sent6035632

1 Comments

Sorted by latest first Latest Oldest Best

 

@Candy875

I've solved it by using a script that redirects the user if he is logged into G+.

I've scavenged the script from this site

The explanation on how the script works can be found here.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme