0

This question already has an answer here:

I have a joomla site that is set to registered permissions only. Currently, everything works fine after migrating it to another folder, but when my users log in and AFK for a bit of time and then come back, they are given 403 errors after navigating to another area on the site or sometimes when refreshing.

I have checked htaccess and category/article permissions, cleared caches, and emptied all trash, but the problem still persists. At the moment, I am not able to reproduce as it seems to happen randomly, but my users are reporting this happening.

Any suggestions would be greatly appreciated, it is becoming a bit frustrating not being able to correctly identify the problem. Thanks!

marked as duplicate by FFrewin, johanpw, Neil Robertson, Terry Carter, TryHarder Apr 27 '16 at 0:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 403 error means something is forbidden to access it on the server. You still have to reproduce it, in order to see when and where it does occur, so then try to find why it is happening. – FFrewin Apr 25 '16 at 8:05
  • Have been working to reproduce it. No luck yet; will definitely update status on that if/when I do. Thanks again :) – user1721449 Apr 25 '16 at 18:08
  • Hi, I couldn't get the code from htaccess to fit in here - nor could I get it to format correctly. Anyway, you can see my htaccess here: paste.ee/p/IDP5b – user1721449 Apr 26 '16 at 19:14
  • Just realized you have double posted the same question. Why? – FFrewin Apr 26 '16 at 19:33
0

If you are using the master .htaccess by Nicholas K. Dionysopoulos, scroll down and look for

########## Begin - Advanced server protection rules exceptions ####
#These are sample exceptions to the Advanced Server Protection 3.1
# rule set further down this file.

You can add single files using his examples and add entire folders like below. Make sure you put / between subfolder names. These are the ones I just keep in the .htaccess I use:

### MULTIMEDIA
RewriteRule ^plugins/content/jw_allvideos/includes/jw_allvideos_scripts\.php$ - [L]
### AKEEBA
RewriteRule ^administrator/components/com_akeeba/restore\.php$ - [L]
RewriteRule ^administrator/components/com_admintools/restore\.php$ - [L]
RewriteRule ^kickstart\.php$ - [L]
### MIJOSHOP PERMISSIONS ###
RewriteRule ^plugins\/system\/mijoshopjquery\/mijoshopjquery/ - [L]
### RSJOOMLA ###
RewriteRule ^components\/com_rsform\$ - [L]
### WIDGETKIT ##
RewriteRule ^cache\/widgetkit/ - [L]
RewriteRule ^component\/widgetkit/ - [L]
RewriteRule ^cache\/com_zoo/ - [L]           
### ALLOW TEMPLATE ###
RewriteRule ^administrator\/component\/com_gantry/ - [L]
RewriteRule ^administrator\/templates\/isis/ - [L]
RewriteRule ^cache\/Gantry/ - [L]
RewriteRule ^cache\/GantryLess/ - [L]
RewriteRule ^component\/com_gantry/ - [L]
RewriteRule ^libraries\/gantry/ - [L]
RewriteRule ^media\/system/js/ - [L]
RewriteRule ^plugins\/system\/gantry/ - [L]
RewriteRule ^templates\/TEMPLATE_NAME/ - [L]
RewriteRule ^libraries\/gantry\/admin/ - [L]

also add this (also from master .htaccess):

## Referrer filtering for common media files. Replace with your own domain name.
## This blocks most common fingerprinting attacks ;)
## Note: Change www\.example\.com with your own domain name, substituting the
## dots with \.  i.e. use www\.example\.com for www.example.com
RewriteRule ^images/stories/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|css|js|swf|ico)$ - [L]
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?example\.com [NC]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(jp(e?g|2)?|png|gif|bmp|css|js|swf|ico|less|json)$ - [F]
  • Thanks. This helps, but my users are still receiving 403 errors at random. Should I post some apache logs? – user1721449 Apr 26 '16 at 18:48
  • Hi, I couldn't get the code from htaccess to fit in here - nor could I get it to format correctly. Anyway, you can see my htaccess here: paste.ee/p/IDP5b – user1721449 Apr 26 '16 at 19:14
  • Sorry, totally missed your comment till today. Edited answer. – YellowWebMonkey May 24 '16 at 18:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.