# Mod Rewrite - Verify Referer

**URL:** <https://forum.kirupa.com/t/mod-rewrite-verify-referer/239680>\
**Category:** programming\
**Created:** [September 24, 2007, 8:25pm UTC](https://forum.kirupa.com/t/mod-rewrite-verify-referer/239680 "2007-09-24T20:25:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wjaspers](https://avatars.discourse-cdn.com/v4/letter/w/e19b73/32.png) [@wjaspers](https://forum.kirupa.com/u/wjaspers)\
**Post date:** [September 24, 2007, 8:25pm UTC](https://forum.kirupa.com/t/mod-rewrite-verify-referer/239680/1 "2007-09-24T20:25:50Z")

</div>

I’m in need of a few lines for mod\_rewrite, installed with Apache 2.0.59 and PHP 4.3.9.

I’m trying to verify a referer from our site so that downloads can’t be accessed without coming through our download.php.

I do not want a PHP script which does the referer check.

Any other requests should automatically be deflected to a 401 Not Authorized.

Any help in solving this would be greatly appreciated!
