Let's say I have the domain "example.com" which works both with and without the "www." prefix.
And let's say I have a folder thereon called "extra".
When someone visits www.example.com/extra I would expect Apache to redirect them to www.example.com/extra/. But no! Instead, they're sent to example.com/extra/. Losing the www. prefix means that (a) a new session is generated, and the user is signed out, and (b) the security certificate becomes invalid.
I'm using Apache on a shared hosting platform (hsphere).
.htaccess file is as follows:
ErrorDocument 500 "<h2>Application error</h2>Web application failed to start properly"
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php/$1
</IfModule>