Saving Scores For SMF Forums That Reside In A Sub-directory Path

Started by Skhilled, August 13, 2022, 02:28:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skhilled

Quote from: Chen Zhen on August 07, 2022, 02:09:02 AM
If your SMF forum resides in a sub-directory server path then you may have problems saving scores for some games.
In this scenario, a game may redirect to the parent directory of your forum path whilst showing a 403 path error.
Your solution is to adjust your server config or add a server config file in the main server path.

ie. for Apache
Main website url path is: https://mydomain.com
SMF url path is: https://mydomain.com/forum

Use FTP or your terminal to create a .htaccess file in your main server path for "mydomain.com" (not your SMF path but possibly its parent path)

htaccess possible contents:
RewriteEngine on
RewriteCond %{QUERY_STRING} act=Arcade
RewriteCond %{REQUEST_URI} !forum
RewriteRule (.*) https://%{HTTP_HOST}/forum/$1 [NC,L]