I can't say im familiar with the .htaccess file.

I need to create a htaccess file that will redirect the user if he manually tries to open a .txt file on the server, or tries to download it (example if the user tries to navigate to www.domain.com/users/username/bio.txt, then he will get redirected)

I do not where else to post this, so please redirect me if this is the wrong thread for the topic.

Thx in advance.

RewriteEngine on
RewriteRule \.txt$ /notallowed.html [F,L,NC]

That was easy, thanks! xD
Could you tell me what [F,L,NC] does? What it stands for?

This article has been dead for over six months. Start a new discussion instead.