Solved

.htaccess

Posted on 2008-10-26
3
405 Views
Last Modified: 2012-05-05
How do i create a .htaccess that will check to see if the cookie usrfx exists and if it does do nothing but if it doesn't redirect.
0
Comment
Question by:stargateatlantis
  • 2
3 Comments
 
LVL 12

Expert Comment

by:jazzIIIlove
ID: 22809341
Hi there;

This may help:

http://forums.deftechgroup.com/showthread.php?t=1975

or with php:
<?php

// Look for cookie with a name of hello and see that it DOESNT exist first.
if(!$_COOKIE['hello']) {
// The cookie doesn't exist, send visitor to the following URL
Header("Location: http://www.domain.com/url.php");
Exit;
} else {
// The cookie exists
// Put code here or escape PHP and put HTML here.

}

?>
Best regards...
0
 

Author Comment

by:stargateatlantis
ID: 22809453
That works if you are using PHP.  but how do u do it from a .htaccess file
0
 
LVL 12

Accepted Solution

by:
jazzIIIlove earned 500 total points
ID: 22809483
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now