Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude specific file types from the following .htaccess rewrite rule?

How can you exclude specific files types (xml and txt) from the following rewrite rule?

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://website.com/$1/ [QSA,L,R=301]
like image 634
hsatterwhite Avatar asked Mar 31 '11 01:03

hsatterwhite


1 Answers

What about :

RewriteCond %{REQUEST_URI} !\.(xml|txt)$
like image 73
M'vy Avatar answered Oct 20 '22 09:10

M'vy