Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.htaccess and ForceType question - extensionless files?

This is my .htaccess file:

<Files .*>
ForceType application/x-httpd-php
SetHandler application/x-httpd-php
</Files>

<Files mytesting>
ForceType application/x-httpd-php
</Files>

<Files *.asp>
ForceType application/x-httpd-php
</Files>

Is it possible using the ForceType directive to allow extensionless files, rather than doing selected extensions, e.g. the mytesting one above?

Thanks

like image 419
whitstone86 Avatar asked Jan 23 '11 20:01

whitstone86


1 Answers

Use <Files *> to match any file.

If you want to match only files that do not have extensions, use <Files [^.]+>.

like image 58
Zach Rattner Avatar answered Oct 01 '22 12:10

Zach Rattner