How to remove www?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
potku
Registered User
Posts: 799
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

How to remove www?

Post by potku » Tue May 01, 2018 10:32 am

Our top domain automatically redirects to https://potku.net without the www. Our phpBB forum at https://potku.net/forum does not do the same. Thus, the URL https://www.potku.net/forum is alive and well. That, however, has some undesired effects on certain EXTs. And it doesn't look good. :D

How could we remove the www from our forum URL?

Thanks in advance. :)

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19713
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably . . .

Re: How to remove www?

Post by Mick » Tue May 01, 2018 10:34 am

I would suggest you need to ask your host, I’ve never had www as my host strips www out, probably with some redirect magic.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
david63
Jr. Extension Validator
Posts: 14560
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: How to remove www?

Post by david63 » Tue May 01, 2018 10:49 am

Interestingly this site has the www in the address and links!
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2734
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: How to remove www?

Post by thecoalman » Tue May 01, 2018 11:29 am

To force a site to use the non www you need to create .htacess rule for it. When the user requests page with WWW they will be redirected to non WWW page, you should also be redirecting http to https. There is plenty of examples on how to do this if you google it.

phpBB itself should have no problems with this as the URL's generated are based on the request for the page. If you are redirecting that occurs before the phpBB script is executed thus any page generated should not have any internal WWW links produced.
has some undesired effects on certain EXTs
If an extension is adding the WWW you need to post the problem in the extensions topic.

User avatar
potku
Registered User
Posts: 799
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: How to remove www?

Post by potku » Tue May 01, 2018 12:32 pm

There is one EXT that really only works without the www, and based on that discussion I started this topic. The creator of that EXT figured out www was the reason it isn't working A-OK on our forum.

Our technical admin does not know how to make the www disappear on our forum. We are all doing our share as volunteers. :) That's why I am asking here. What ever he was able to do with our top domain doesn't seem to work with phpBB. There are plenty of example on the Internet how to redirect from www to non-www, but none that I found dealt with phpBB directly. That's why I thought you here would be able to give us some help. :)
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19713
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably . . .

Re: How to remove www?

Post by Mick » Tue May 01, 2018 1:44 pm

It’s not really a phpBB thing, it’s a server thing common to all apache type servers. The connection with phpBB is that the .htaccess file we’re on about is in the board root.
thecoalman wrote:
Tue May 01, 2018 11:29 am
There are plenty of examples on how to do this if you google it
Try searching “.htaccess remove www and force https”.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49328
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to remove www?

Post by stevemaury » Tue May 01, 2018 2:47 pm

thecoalman wrote:
Tue May 01, 2018 11:29 am
To force a site to use the non www you need to create .htacess rule for it. When the user requests page with WWW they will be redirected to non WWW page, you should also be redirecting http to https. There is plenty of examples on how to do this if you google it.
This is not help?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

User avatar
potku
Registered User
Posts: 799
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: How to remove www?

Post by potku » Tue May 01, 2018 3:04 pm

Steve, sure.

Mick, thanks. I will relay the info. :)
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
potku
Registered User
Posts: 799
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: How to remove www?

Post by potku » Wed May 02, 2018 9:42 am

OK, thanks, but does that also work with https://www.potku.net/forum -> https://potku.net/forum?
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19713
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably . . .

Re: How to remove www?

Post by Mick » Wed May 02, 2018 9:44 am

potku wrote:
Wed May 02, 2018 9:42 am
OK, thanks
Ignore the above post, I’m going to remove it.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2734
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: How to remove www?

Post by thecoalman » Thu May 03, 2018 11:14 am

potku wrote:
Tue May 01, 2018 12:32 pm
There are plenty of example on the Internet how to redirect from www to non-www, but none that I found dealt with phpBB directly.
They don't have to deal directly with phpBB, the rules for redirecting from WWW to non WWW page applies to everything.

User avatar
potku
Registered User
Posts: 799
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: How to remove www?

Post by potku » Thu May 03, 2018 11:56 am

That would make sense, but if I have understood correctly, that has not been the case with our forum. Unfortunately, the IT professionals in our tech group have not voiced their opinion, so we are left in the dark.
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19713
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably . . .

Re: How to remove www?

Post by Mick » Fri May 04, 2018 7:45 am

I reckon if your ‘IT professionals’ don’t know or can’t find out how to do the www thing then maybe you should be looking for some new tech guys.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
potku
Registered User
Posts: 799
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: How to remove www?

Post by potku » Fri May 04, 2018 8:53 am

Ten years ago, both finding an answer and recruiting volunteers were very easy and fast, but with the massive decline of popularity with bulletin boards in the 2010s, we are nowadays clutching at straws. Well, this WWW matter is not that urgent, so I will follow this topic in case someone somewhere down the line might provide something we can use. It is what it is.

Thanks, all. :)
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

paul7289
Registered User
Posts: 5
Joined: Fri May 18, 2018 1:03 pm
Contact:

Re: How to remove www?

Post by paul7289 » Fri May 18, 2018 1:35 pm

The easiest way would be to redirect all requests via htaccess like this:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} !^potku\.net$ [NC]
RewriteRule ^(.*)$ http://potku.net/$1 [R=301,L]

Post Reply

Return to “[3.2.x] Support Forum”