Reply to Re: Apache Rewrite Help needed

Your name:

Reply:


Posted by Justin Koivisto on 12/19/05 16:18

deja@homerlex.mailshell.com wrote:

[snip]

> I need a script that will first test to see if the user is trying to
> download a file from a specific location (ie "/content/protected") If
> they are downloading from this folder then I want to see if a specific
> variable is set in the cookie (ie loggedin="true").

[snip]

> I did find a script that checks the cookies and does a redirect.
> I just need the stuff about only checking the cookie for a specific
> directory and appending the file name to the redirect.
>
> Here is the sample I found:
> RewriteEngine on
> RewriteCond %{HTTP_COOKIE} !^.*loggedin=true.*$
> RewriteRule .*$ http://www.domain.com/login.php
>
> Your help is greatly appreciated!
>

Before the existing RewriteCond, add this:

RewriteCond %{REQUEST_URI} /content/protected


F'up to: alt.apache.configuration

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация