Announcement

#1 2021-05-24 20:43:27

cbiweb
Member
2021-04-04
46

[resolved] 403 Forbidden error when using Javascript?

Using the "Add <head> Element" plugin, I entered the following javascripts:

Code:

<script type="text/javascript" src="scripts/disabled.js"></script>
<script type="text/javascript" src="scripts/nodrag.js"></script>

Soon as I hit submit , it throws this error:

403 Forbidden
Please forward this error screen to [the] WebMaster.
Access is forbidden to the requested page

Why would it do that?  The scripts are for disabling right click and dragging (please let's keep responses on the topic of the 403 error, and not about theft protection being pointless, thank you).

Last edited by cbiweb (2021-05-24 20:43:50)

Offline

 

#2 2021-05-24 21:53:01

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: [resolved] 403 Forbidden error when using Javascript?

check

scripts directory permissions, and/or, script permissions themselves

Offline

 

#3 2021-05-24 22:57:13

cbiweb
Member
2021-04-04
46

Re: [resolved] 403 Forbidden error when using Javascript?

jnashpiwigo wrote:

check

scripts directory permissions, and/or, script permissions themselves

I was hopeful but that wasn't it.  Anything else I could try?  Or is it a hosting issue?  My host is Namecheap.

Offline

 

#4 2021-05-27 02:03:33

cbiweb
Member
2021-04-04
46

Re: [resolved] 403 Forbidden error when using Javascript?

Finally got this resolved.

The problem was a ModSecurity module on the host's server.  A few of the rules were triggering false positives.

Once they tracked them down, they made the necessary adjustment, and now the script is working.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact