Issue with redirects

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
shortmort37
Registered User
Posts: 621
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Issue with redirects

Post by shortmort37 »

This is perhaps more of an Apache question, but because my hosting provider suggested phpBB could be implicated, I want to rule it out.

At one time phpBB was just a part of my website, in a /59forum subdirectory; over time, I've shoe-horned the content into the board itself. Consequently, I redirect 59plymouth.net -> 59plymouth.net/59forum, which is the root of my board. This works fine.

I also have an alias for my domain: 59sportfury.net. So I also redirect 59sportfury.net -> 59plymouth.net/59forum, and this works fine as well.

For the sake of completeness, and for some old time users of the alias name, I'd also like to redirect 59sportfury.net/59forum -> 59plymouth.net/59forum. But nothing I do seems to work; a redirect appears to happen, but the page lands at 59sportfury.net/59forum. My ISP says:
Both 59plymouth.net and 59sportfury.net were redirecting to 59plymouth.net/59forum as requested. You are correct however that 59sportfury.net/59forum is not redirecting to 59plymouth.net/59forum.

The issue here is that both 59sportfury.net and 59plymouth.net share the same document root (home/public_html). If you are able, please check your database and make sure that the site inside public_html/59forum is set to 59plymouth.net/59forum. There could be an issue with the permalinks in the sites code, potentially causing this redirect to not function. Essentially cPanel is seeing the redirect rule you are trying to create as the site redirecting to itself since the document root is being shared.
There are zero references within the phpBB config to 59sportfury.net; and I don't see why them sharing the root should matter (especially since 59sportfury.net successfully redirects to 59plymouth.net). I'd like to challenge them, but I'm wondering if anyone has advice. Here's the pertinent snippet from my .htaccess file in public_html:

Code: Select all

RewriteEngine on

RewriteCond %{HTTP_HOST} ^59plymouth\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.59plymouth\.net$
RewriteRule ^/?$ "https\:\/\/www\.59plymouth\.net\/59forum" [R=301,L]

RewriteCond %{HTTP_HOST} ^59sportfury\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.59sportfury\.net$
RewriteRule ^/?$ "https\:\/\/www\.59plymouth\.net\/59forum" [R=301,L]

RewriteCond %{HTTP_HOST} ^59sportfury\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.59sportfury\.net$
RewriteRule ^59forum\/?$ "https\:\/\/www\.59plymouth\.net\/59forum" [R=301,L]
Could it be that I need to move the last rule here to the .htaccess in /59forum (supplied by phpBB)?

Dan
Post Reply

Return to “[3.3.x] Support Forum”