0

Hi!
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.

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by diafol
Featured Replies
  • 1
    diafol 3,317   5 Years Ago

    Have a look here (htaccess cheatsheet): [url]http://borkweb.com/story/apache-rewrite-cheatsheet[/url] Read More

0
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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.