Solved

.htaccess

Posted on 2008-10-26
3
406 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP Curl Multi-exec 13 71
browser caching 4 71
Generic Rule to Redirect and Rewrite URL using .htaccess 8 82
NGINX/Apache redirect on 403 and 404 5 88
As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
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 …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 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