× How To / General

Problem with redirections in J4 und Joomdle 2

3 months 3 weeks ago
StefanGros
Posts: 21
More
Topic Author
Problem with redirections in J4 und Joomdle 2 #1
After upgrading my site to j4 and installing joomdle 2
I get Errors in the system check at the two connectivity lines and 500 errors at login and logout

www.kepos.at/moodle/auth/joomdle/land.ph...login%26Itemid%3D101 k

What has gone wrong?

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
Antonio Durán
Posts: 7417
More
Problem with redirections in J4 und Joomdle 2 #2
Hi.

The internal server errors should leave something in the logs that may give you some hints.
Just opening this fails: www.kepos.at/moodle/auth/joomdle/land.php k
So you could open it and check your logs to see if there's something in there.

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
StefanGros
Posts: 21
More
Topic Author
Problem with redirections in J4 und Joomdle 2 #3
Those are the errorlines:
2022-01-22 17:06:38 10.10.10.213 GET /moodle/auth/joomdle/land.php - 443 - 192.168.69.21 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:96.0)+Gecko/20100101+Firefox/96.0 - 500 50 5 46
2022-01-22 17:06:39 10.10.10.213 GET /favicon.ico - 443 - 192.168.69.21 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:96.0)+Gecko/20100101+Firefox/96.0 www.kepos.at/moodle/auth/joomdle/land.php k 404 0 0 109

Looks like some problem with URL-Rewrites?

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
StefanGros
Posts: 21
More
Topic Author
Problem with redirections in J4 und Joomdle 2 #4
Was a problem with URL-Rewrite in web.config. I copied a web.config.txt from another site to the kepos directory renamed it to web.config and everything seems to work. Everything startet with akeeba admin-Tool ...so secure that nothing works anymore. Thank you for your help

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
Antonio Durán
Posts: 7417
More
Problem with redirections in J4 und Joomdle 2 #5
Great to know it is working now, thanks for sharing.

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
StefanGros
Posts: 21
More
Topic Author
Problem with redirections in J4 und Joomdle 2 #6
I celebrate to eary. It worked when i went home yesterday and now i get the same error again. I deinstalled AdminTools, since they cause a lot of troulse but without any effect. Tehn i tried to deinstall joomdle and that broke the whole site. (Error 500 all over). Now i restore from backup

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
Antonio Durán
Posts: 7417
More
Problem with redirections in J4 und Joomdle 2 #7
Hi.
Sorry to hear that...it is weird that it worked for a while and then failed again....

I don't know what web.config is... what server are you running?
Was Joomdle 1.x working fine in that same server?
If you disable SEF, does it work? This would confirm that the problem is related to SEF/URL rewrite

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
StefanGros
Posts: 21
More
Topic Author
Problem with redirections in J4 und Joomdle 2 #8
Reinstalled the site and evrything was working fine, including signin and logout. As soon as i activate URL-ReWrite in Konfiguration->Site->SEo-Optimization i get the same error again. I am on a windows-Server, so the configuration is in web.config-file. After changing the setting you are asked to change the web.config to:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path=".">
<system.webServer>
<directoryBrowse enabled="false" />
<rewrite>
<rules>
<rule name="Joomla! Common Exploits Prevention" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="base64_encode[^(]*\([^)]*\)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="(>|%3C)([^s]*s)+cript.*(<|%3E)" />
<add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
</conditions>
<action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="Joomla! API Application SEF URLs">
<match url="^api/(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/api/index.php" ignoreCase="true" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="api/index.php" />
</rule>
<rule name="Joomla! Public Frontend SEF URLs">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/index.php" ignoreCase="true" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
<httpProtocol>
<customHeaders>
<add name="X-Content-Type-Options" value="nosniff" />
<!-- Protect against certain cross-origin requests. More information can be found here: -->
<!-- developer.mozilla.org/en-US/docs/Web/HTT...source_Policy_(CORP) k -->
<!-- web.dev/why-coop-coep/ k -->
<!-- <add name="Cross-Origin-Resource-Policy" value="same-origin" /> -->
<!-- <add name="Cross-Origin-Embedder-Policy" value="require-corp" /> -->
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
</configuration>

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
Antonio Durán
Posts: 7417
More
Problem with redirections in J4 und Joomdle 2 #9
Hi.

I don't know if it can be related to Windows, I don't use it so I cannot test.
I tested in my local installation with URL Rewrite enabled, and log in worked just fine.
Does everything work with URL Rewrite, but Joomdle? If you disable Joomdlehooks plugin (so no SSO is perfomed), does login work?

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago
StefanGros
Posts: 21
More
Topic Author
Problem with redirections in J4 und Joomdle 2 #10
Everything except login in and out works fine
Right now i install a backup on a testsite to test the deinstallation of joomdle, which killed my site on sunday. Maybe it helps to detect the problem
Unfortunately i have no idea about php-coding, so i have no idea whats going on with the web.config. I had a lot of problems regaring the Web.config hardening tool of Admin-Tools wich broke my moodle too. But its disabled now.

Please Log in or Create an account to join the conversation.