Chintan Gor
Chintan Gor

Reputation: 1072

allow .php extension in htaccess file

I am using this htaccess code to check login and download any direct hot link file

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.+)$  /includes/put_file.php?dir=laudos&file=$1 [L,NC,QSA]

my problem is i want to skeep .php extension files just want to check .jpg, .doc etc document kind of files

Upvotes: 0

Views: 622

Answers (2)

Panama Jack
Panama Jack

Reputation: 24458

Is this what you're looking for?.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !\.(php)$
RewriteRule ^(.*)$  /includes/put_file.php?dir=laudos&file=$1 [L,NC,QSA]

Upvotes: 5

spaceman
spaceman

Reputation: 833

Maybe something like that

RewriteRule ^(.+\.(jpg|doc))$ /includes/put_file.php?dir=laudos&file=$1 [L,NC,QSA]

Upvotes: 5

Related Questions