I'm no expert, I tinker with my own stuff at my own risk. If you use it you do so at your own risk.

It does involve editing a core file which tends to be frowned upon here. You have been warned.
includes/functions.php
find (around line 3134)
Code: Select all
'S_LOGIN_ACTION' => build_url(array('f')),
replace with
Code: Select all
'S_LOGIN_ACTION' => 'https://<replace this with your forum url>' . build_url(array('f')),
find (around line 5203)
Code: Select all
'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id)),
replace with
Code: Select all
'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("https://{$user->host}{$user->page['root_script_path']}ucp.$phpEx", 'mode=login') : append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id)),
.htaccess
I have included a bit of the original .htaccess here to show where the changes are.
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
# The following 3 lines will rewrite URLs passed through the front controller
# to not require app.php in the actual URL. In other words, a controller is
# by default accessed at /app.php/my/controller, but can also be accessed at
# /my/controller
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php [QSA,L]
# SSL on selected pages
RewriteCond %{HTTPS} !=on
RewriteCond %{QUERY_STRING} mode=(login|reg_details|register) [OR]
RewriteCond %{QUERY_STRING} i=(pm|ucp_pm) [OR]
RewriteCond %{REQUEST_URI} adm/
RewriteRule (.+) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !.*\.(js|css|gif|png|jpg|woff|ttf)
RewriteCond %{QUERY_STRING} !.*\.(gif|png|jpg)
RewriteCond %{HTTPS} on
RewriteCond %{QUERY_STRING} !mode=(login|reg_details|register)
RewriteCond %{QUERY_STRING} !i=(pm|ucp_pm)
RewriteCond %{REQUEST_URI} !adm/
RewriteRule (.+) http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Options +FollowSymLinks
</IfModule>
Never argue with idiots, they will drag you down to their level and beat you with experience.