?
Solved

.htaccess

Posted on 2008-10-26
3
Medium Priority
?
410 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 total points
ID: 22809483
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 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