Solved

.htaccess

Posted on 2008-10-26
3
409 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 500 total points
ID: 22809483
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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