Guidance please?

Discuss practical ways rearrange URLs using mod_rewrite.

Guidance please?

Postby Guest » Sat Aug 31, 2002 6:49 am

With a .htaccess file located in the document root directory of http://host.mydomain.com - I want to be able to redirect users to another url if the following condition/s are met.

1. the HTTP_REFERER is NOT http://www.mydomain.com AND the file extension as part of the url IS *.exe or *.zip.


Put another way....

Essesntially there is a downloads directory under the root directory ie.

http://host.mydomain.com/downloads

This directory contains *.exe and *.zip files. I only want to allow access to these files if the HTTP_REFERER IS http://www.mydomain.com. OTHERWISE they are to be redirected to http://www.mydomain.com.

I still want to allow referals to *.html *.php files... just no *.exe or *.zip's.

I am pretty new at this so any help would be appreciated. :D
Guest
 

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 7 guests

cron