J
J
Junior Development2021-06-10 16:57:37
htaccess
Junior Development, 2021-06-10 16:57:37

How to exclude from .htaccess if request ends with .ttf?

Please tell me how to add
`namesites.com/object/fonts/folderFonts/nameFonts.ttf` to the exception

# BEGIN WordPress

RewriteEngine On
RewriteCond %{REQUEST_URI} ttf
RewriteCond %{REQUEST_URI} !ttf
RewriteCond %{REQUEST_URI} !^(ttf)/$
RewriteCond %{HTTP_HOST} ^www.namesites.com$ [NC]
RewriteRule ^(.*)$ https://namesites.com/$1 [R=301,L]

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{REQUEST_URI} ttf
RewriteCond %{REQUEST_URI} !ttf
RewriteCond %{REQUEST_URI} !^(ttf)/$t
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Redirect 301 "/index.php" "https://namesites.com/folder/index.html"


# END WordPress

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2021-06-11
@shambler81

RewriteCond %{REQUEST_URI} !^.+\.(ttf)(/|)$ [NC]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question