Redirect Addon for Non-www to www-version

jiewaqpe

Member
I am looking for a add-on for redirecting the non-www version of the URL to www-version or will it be better to do this with .htaccess file as done with normal html websites?
 
Inside my .htaccess i have

Code:
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

But when i have a direct thread url e.g.

Code:
https://example.com/index.php?threads/test.23695/

It does not redirect to the www-version. What am i missing there in the .htaccess?
 
Don't forget that some browsers now drop the www prefix from the domain when they display the URL - even when using the www version.

For example, Chrome shows an abbreviated URL without the protocol or www prefix:

1584300664111.webp

... but when you click on the address bar, it expands to the full version of the URL:

1584300685951.webp
 
Perfect thank you @AndyB
Sure i make a backup before changing this setting, but it should work on an already running board with everything configured?

Edit// It works perfectly now, thanks a lot :)
 
Last edited:
Back
Top Bottom