Solved

.htaccess

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Php Remote Files 13 56
Internal wordpress pages 404 5 37
PHP in Apache server 20 81
whm high memory usage in processes 7 36
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…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

13 Experts available now in Live!

Get 1:1 Help Now