Jump to content
43oh

43oh reachable both with and without www


Recommended Posts

This is more of a nuisance than a real problem.

 

The forum is reachable with and without a www prefix, ie. one of then doesn't redirect to the other. This throws off the automatic URL detection in posts.

 

Suppose you are browsing

http://43oh.com/forum/viewtopic.php?f=10&t=1684

and want to paste that URL into a new post. For one reason or another, you open your post composing window as

http://www.43oh.com/forum/posting.php?mode=reply&f=10&t=1684

Putting the www-less URL here will result in a display like

http://43oh.com/forum/viewtopic.php?f=10&t=1684

whereas the www-prefixed URL results in

viewtopic.php?f=10&t=1684

 

This is most likely because the forum engine recognizes itself based solely on the name it is currently being accessed by.

 

One (maybe the only sane one?) solution is to redirect

http://www.43oh.com(.*)

to

http://43oh.com$1

which makes the whole site reachable under one unified name space, regardless of how the user wanted to access it in the first place. If this bothers anyone else too, that is :P:).

Link to post
Share on other sites

Just enter '43oh.com' in the "redirects to" box, and select the "Only redirect with http://www. I'm not sure if that will handle the subdirectories (e.g. "/forum"), so someone may have to give some further help on the "Wildcard redirect" option.

 

Who's your host? Maybe I can find some info online.

Link to post
Share on other sites

You need 301 (permanent) redirects, redirecting

http://www.43oh.com/

to

http://43oh.com/

(or the other way around). Hard to be more helpful without seeing all the options. Is this the website's control panel (if yes, do you know what CP is it?) or PHPBB's?

 

Be careful so as to not cause a redirect loop locking yourself out (hopefully the CP is available under some different domain :)).

Link to post
Share on other sites

I have no idea. I can coerce a naked Apache into singing nursery rhymes woken from an alcohol-induced coma, but I don't speak the language control panel writers invented.

 

A little digging says it's probably cPanel, a little more digging makes me say "yes, do turn on wildcard redirects".

Link to post
Share on other sites

I found some old discussion here that suggests cPanel can't do it (industry leading control panel solution in 2011!), but gives you what should you be putting in your site's .htaccess:

 

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...