Search
 
SCRIPT & CODE EXAMPLE
 

HTML

disable pdf download to not logged in users wordpress

<IfModule mod_rewrite.c>
  RewriteEngine On
  # If a not logged in user tries to download a file it will redirect to home:
  ErrorDocument 403 https://www.yoursite.com/
  RewriteCond %{REQUEST_FILENAME} (.*)
  # requires a cookie (wordpress login) for downloading media files
  RewriteCond %{HTTP_COOKIE} !wordpress_logged_in_([a-zA-Z0-9_]*) [NC]
  # Add more document extensions here. 
  # If you add image types (jpg,gif...) they woun't be shown to not logged users!
  RewriteRule .(zip|doc|docx|pdf)$ – [NC,F,L]
</IfModule>
Comment

PREVIOUS NEXT
Code Example
Html :: html color picker snippet 
Html :: how to remove the timeline in html video 
Html :: change text color exactly one word inside text html 
Html :: html li tag 
Html :: a attributes html 
Html :: xpath find by sybling element 
Html :: aligment absolute center slds 
Html :: django html in vscode 
Html :: html details open default 
Html :: flask base models 
Html :: get post java html 
Html :: html datalist 
Html :: html projects for beginners 
Html :: vuejs toggle on each in v-for 
Html :: how to increase size of input submit type in html 
Html :: js coding practices airbnb 
Html :: ipython.display html 
Html :: mvc 5 required field validation not working 
Html :: jinja check if variable is none 
Html :: postcode input html 
Html :: html input name and value and id 
Html :: static html template 
Html :: default php version ubuntu 20.04 
Html :: input radio button html 
Html :: tailwind cards 
Html :: Przezroczysty div 
Html :: unyson demo import fail 
Html :: easy cubism landscape painting for beginners 
Html :: how to format vue html with prettier 
Html :: Show all the tags 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =