Forum page redirect

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Webmasterks
Registered User
Posts: 259
Joined: Tue May 27, 2003 11:28 pm
Location: The Hague, The Netherlands
Contact:

Forum page redirect

Post by Webmasterks » Sun May 26, 2019 2:02 pm

I'm not sure if this is the right spot to ask this question, but I'm running forum version 3.2.5 (going to update it in a couple days) and I would like to redirect a forum topic to a page on my Wordpress website. I have put the redirect in my .htaccess, but when I type the forum URL in the address bar, it keeps going to the forum, instead of the page on my website. Usually a redirect like this works immediately. How come this one doesn"t?

The redirect I used is:

Code: Select all

redirect 301 /phpBB2/viewtopic.php?f=91&t=7549 https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/
What can I do to make this work?

Thanks :-)

User avatar
EA117
Registered User
Posts: 610
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Forum page redirect

Post by EA117 » Sun May 26, 2019 3:03 pm

Don't know if it's actually the issue occurring in your specific situation, but what comes to mind for me is that there can be additional things in the URL besides "just the forum and topic ID." The rule you showed would match if the link being navigated to was exactly as shown, but not in any of the variants like having a SID in the URL, showing search result highlights, jumping to a specific post number, etc.

A RedirectMatch directive in the .htaccess can handle cases where more than one URL needs to be matched. For example:

Code: Select all

RedirectMatch 301 /phpBB2/viewtopic.php\?.*f=91&t=7549.* https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/
That's not an ultra-accurate regular expression, but should be enough to avoid any false positives. Note when someone searches your forum and finds a specific prior post within that topic ID (presuming you haven't removed the earlier posts), it's still just the same generic redirect that is going to happen, and nothing that would try and jump them to any particular post in that Wordpress discussion.

Webmasterks
Registered User
Posts: 259
Joined: Tue May 27, 2003 11:28 pm
Location: The Hague, The Netherlands
Contact:

Re: Forum page redirect

Post by Webmasterks » Sun May 26, 2019 3:46 pm

Thank you for your help. But if I would type in the exact same (forum) URL as I've shown, so without any excess parameters like SID, wouldn't that 301 line be sufficient?

I'll give the RedirectMatch a try ;-)

EDIT:

Just tried it, but it still goes directly to the forumpage. Even if it doesn't redirect a user to my website page, does Google still see it and award the juice to the page I redirected to?

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

Re: Forum page redirect

Post by stevemaury » Sun May 26, 2019 4:34 pm

Where is the .htaccess file? and isn't the actual url of that topic https://www.dekattensite.nl/phpBB2/viewtopic.php?f=91&t=7549?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
EA117
Registered User
Posts: 610
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Forum page redirect

Post by EA117 » Sun May 26, 2019 4:54 pm

Webmasterks wrote:
Sun May 26, 2019 3:46 pm
Thank you for your help. But if I would type in the exact same (forum) URL as I've shown, so without any excess parameters like SID, wouldn't that 301 line be sufficient?
Yes, you're right. An explicit test of the clean URL should have already been able to demonstrate that the redirect was in effect.
Webmasterks wrote:
Sun May 26, 2019 3:46 pm
Just tried it, but it still goes directly to the forumpage. Even if it doesn't redirect a user to my website page, does Google still see it and award the juice to the page I redirected to?
No, if you can't get the web browser to do it, it's simply not in effect. Steve's question of "where is it" is certainly important, although for it to be "in the wrong place" we're saying the .htaccess is neither at the root of the site nor in the phpbb2 folder, since it should have worked in either location.

In addition to confirming Steve's "where is the file you're editing", do you have other redirects in that same .htaccess which are working, but simply not this one?

Webmasterks
Registered User
Posts: 259
Joined: Tue May 27, 2003 11:28 pm
Location: The Hague, The Netherlands
Contact:

Re: Forum page redirect

Post by Webmasterks » Sun May 26, 2019 10:03 pm

@SteveMaury

The .htaccess is located in the root of the website and there's one in the phpbb-folder. I just tried the RedirectMatch in both places (not at the same time, though), but the result is the same: the browser just sends me to the forum page.
And yes, that is the actual URL. Both my website as well as my forum are located on the same domain.

@EA117

Yes, there are more 301 redirects in the .htaccess in the root of the website and they all seem to work, apart from the redirects where I want to redirect a forum page to a page on my website (there's one more that I had put in there a while back and that's also still not working - I thought it took some time to take effect, but apparently that is not the case).

What would the consequence be if I write the full (from-)URL in the redirect or would that not make a difference?

EDIT:

I was just looking through the code in the .htaccess and there are plugins I use that have added code to the file. I am not a programmer, but could it be that some of that code coincides with the forum redirect?

This is the code above the list of redirects in the .htaccess. I can't make heads or tails of it, but maybe for you guys it's clear as day:

Code: Select all

# BEGIN WpFastestCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^www.dekattensite.nl
# Start WPFC Exclude
# End WPFC Exclude
# Start_WPFC_Exclude_Admin_Cookie
RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^\=]+\=Admin
# End_WPFC_Exclude_Admin_Cookie
RewriteCond %{HTTP_HOST} ^www.dekattensite.nl
RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit|Twitterbot|LinkedInBot|WhatsApp|Mediatoolkitbot)
RewriteCond %{HTTP_USER_AGENT} !(WP\sFastest\sCache\sPreload(\siPhone\sMobile)?\s*Bot)
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{REQUEST_URI} !(\/){2}$
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{QUERY_STRING} !.+
RewriteCond %{HTTP:Cookie} !wordpress_logged_in
RewriteCond %{HTTP:Cookie} !comment_author_
RewriteCond %{HTTP:Cookie} !safirmobilswitcher=mobil
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or]
RewriteCond /home/katten/domains/dekattensite.nl/public_html/wp-content/cache/all/$1/index.html -f
RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L]
</IfModule>
<FilesMatch "index\.(html|htm)$">
AddDefaultCharset UTF-8
<ifModule mod_headers.c>
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Mon, 29 Oct 1923 20:30:00 GMT"
</ifModule>
</FilesMatch>
# END WpFastestCache

# BEGIN LBCWpFastestCache
<FilesMatch "\.(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(\.gz)?$">
<IfModule mod_expires.c>
AddType application/font-woff2 .woff2
ExpiresActive On
ExpiresDefault A0
ExpiresByType video/webm A2592000
ExpiresByType video/ogg A2592000
ExpiresByType video/mp4 A2592000
ExpiresByType image/webp A2592000
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/ico A2592000
ExpiresByType image/svg+xml A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
ExpiresByType application/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType application/font-woff2 A2592000
</IfModule>
<IfModule mod_headers.c>
Header set Expires "max-age=2592000, public"
Header unset ETag
Header set Connection keep-alive
FileETag None
</IfModule>
</FilesMatch>
# END LBCWpFastestCache
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Btw, if there's any code I put in here that maybe a safety risk so hackers can have a field day, please let me know ;-)

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

Re: Forum page redirect

Post by thecoalman » Sun May 26, 2019 10:27 pm

Webmasterks wrote:
Sun May 26, 2019 3:46 pm
Thank you for your help. But if I would type in the exact same (forum) URL as I've shown, so without any excess parameters like SID, wouldn't that 301 line be sufficient?

I'll give the RedirectMatch a try ;-)

EDIT:

Just tried it, but it still goes directly to the forumpage. Even if it doesn't redirect a user to my website page, does Google still see it and award the juice to the page I redirected to?
Which .htaccess file are you editing? If there is a htaccess file already present in /phpBB2/ you should edit that one because directives in it could override parent directory .htaccess.

http://httpd.apache.org/docs/current/ho ... s.html#how

The other thing is the depth of htaccess files can be limited by server config. If you are editing the one in /phpBB2/ it may not be active becsue of server config. Try creating test directory with simple htaccess rule you can test.

One other tip, do not use 301 when testing redirects/rewrites. These can be cached by the browser, search engines etc. Use a 302 instead, once you are satisfied it is working properly then switch it to 301.

Webmasterks
Registered User
Posts: 259
Joined: Tue May 27, 2003 11:28 pm
Location: The Hague, The Netherlands
Contact:

Re: Forum page redirect

Post by Webmasterks » Sun May 26, 2019 11:00 pm

thecoalman wrote:
Sun May 26, 2019 10:27 pm
Which .htaccess file are you editing? If there is a htaccess file already present in /phpBB2/ you should edit that one because directives in it could override parent directory .htaccess.
I have never edited the .htaccess in the phpbb-folder. I always put redirects in the root .htaccess. I guess the .htaccess that is present in the phpbb-folder came with the software, because I'm certain I haven't put it there.
thecoalman wrote:
Sun May 26, 2019 10:27 pm
Use a 302 instead, once you are satisfied it is working properly then switch it to 301.
Thanks, I hadn't thought of that. Would that also work with RedirectMatch?

Another thing I'm not sure of (although that maybe a bit off topic): do you have any idea how long I have to maintain older 301's in the .htaccess? What I mean by 'older' is that through the years I have renewed my website a couple of times, and most of the URLs changed so for some pages I have redirects like 'really old -> old', 'old -> newer', 'newer -> newest'. At some point I'm sure I can delete some of them, but I have no clue when that is. There might be websites out there that still link to the oldest URLs, which is why I've never deleted any of the old redirects.

To complete the info, here's the code that's in the phpbb-folder's .htaccess (maybe there's something in there that stops any forum redirects from working correctly):

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine on

#
# Uncomment the statement below if URL rewriting doesn't
# work properly. If you installed phpBB in a subdirectory
# of your site, properly set the argument for the statement.
# e.g.: if your domain is test.com and you installed phpBB
# in http://www.test.com/phpBB/index.php you have to set
# the statement RewriteBase /phpBB/
#
RewriteBase /phpBB2/

#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

#
# The following 3 lines will rewrite URLs passed through the front controller
# to not require app.php in the actual URL. In other words, a controller is
# by default accessed at /app.php/my/controller, but can also be accessed at
# /my/controller
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php [QSA,L]

#
# If symbolic links are not already being followed,
# uncomment the line below.
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
#
#Options +FollowSymLinks
</IfModule>

# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
	<IfVersion < 2.4>
		<Files "config.php">
			Order Allow,Deny
			Deny from All
		</Files>
		<Files "common.php">
			Order Allow,Deny
			Deny from All
		</Files>
	</IfVersion>
	<IfVersion >= 2.4>
		<Files "config.php">
			Require all denied
		</Files>
		<Files "common.php">
			Require all denied
		</Files>
	</IfVersion>
</IfModule>
<IfModule !mod_version.c>
	<IfModule !mod_authz_core.c>
		<Files "config.php">
			Order Allow,Deny
			Deny from All
		</Files>
		<Files "common.php">
			Order Allow,Deny
			Deny from All
		</Files>
	</IfModule>
	<IfModule mod_authz_core.c>
		<Files "config.php">
			Require all denied
		</Files>
		<Files "common.php">
			Require all denied
		</Files>
	</IfModule>
</IfModule>

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* https://www.dekattensite.nl%{REQUEST_URI} [R,L]

User avatar
EA117
Registered User
Posts: 610
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Forum page redirect

Post by EA117 » Mon May 27, 2019 12:43 am

thecoalman's advice to make a temporary redirect while debugging is great advice, of course. I've included it from here on, too.

The "good news" is that I see exactly the issue you see. Even though in my .htaccess of a local XAMPP site at /phpbb, if I create a baseline test of:

Code: Select all

RedirectMatch 302 /phpbb/test https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/
and confirm this rule works in exactly the same context that I expect the viewtopic.php rule to work in, adding the additional rule of:

Code: Select all

RedirectMatch 302 /phpbb/viewtopic\.php\?f=2&t=2 https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/
does not match "/phpbb/viewtopic.php?f=2&t=2" on my site, even though the rule for "/phpbb/test" right above it continues to work. I thought maybe the parameter characters were breaking the matching, so I escaped everything regardless of whether it needed escaped, but it still doesn't work:

Code: Select all

RedirectMatch 302 /phpbb/viewtopic\.php\?f\=2\&t\=2 https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/
Unfortunately RedirectMatch (of mod_alias) doesn't have any debug logging. So I had to convert it into a RewriteRule and enable "LogLevel mod_rewrite.c:trace8" in the httpd.conf:

Code: Select all

RewriteCond %{REQUEST_URI} /phpbb/viewtopic\.php
RewriteCond %{QUERY_STRING} f\=2\&t\=2
RewriteRule (.*) "https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/" [R=302,L]
EDIT:
I had a bunch of logging results in here showing how it still didn't work even using mod_rewrite, but I finally realized it was because mod_rewrite doesn't have the full "rest of the URL" in REQUEST_URI, and I needed to employ QUERY_STRING. With the rule including a condition using QUERY_STRING, the redirect is now happening successfully for me.

I'm still unclear why RedirectMatch isn't also successful, since I see plenty of examples where folks have successfully used RedirectMatch to change "module.php?param1=xxx&param2=yyy" into a new path like "/newsystem/xxx/yyy". But those RedirectMatch statements are not working "as expected" for me, same as they don't seem to be working for Webmasterks.

Webmasterks
Registered User
Posts: 259
Joined: Tue May 27, 2003 11:28 pm
Location: The Hague, The Netherlands
Contact:

Re: Forum page redirect

Post by Webmasterks » Mon May 27, 2019 9:46 am

EA117 wrote:
Mon May 27, 2019 12:43 am
But those RedirectMatch statements are not working "as expected" for me, same as they don't seem to be working for Webmasterks.
I applaud you for taking the time to figure out the how and the why and I appreciate the help so much. Since I'm no wiz in .htaccess code, most of the explanation you gave goes over my head, but is it your conclusion that this problem is harder to fix than it appears to be? If you replicated the issue I have and got it to work, does that mean I can use the code you put at the bottom of your post?

So would it work if I put:

Code: Select all

RewriteCond %{REQUEST_URI} /phpbb/viewtopic\.php
RewriteCond %{QUERY_STRING} f\=91\&t\=7549
RewriteRule (.*) "https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/" [R=302,L]
It's maybe a n00b-question, but is there a preferred place in the .htaccess where to put it?

User avatar
EA117
Registered User
Posts: 610
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Forum page redirect

Post by EA117 » Mon May 27, 2019 1:19 pm

Webmasterks wrote:
Mon May 27, 2019 9:46 am
So would it work if I put:
I got lost in trying to figure out the problem, I forgot to give you a more specific recommendation. 😁 Back to the statement I made earlier regarding "that's not an ultra-accurate regular expression", the thing which still wasn't being explicitly accounted for was accurately finding your specific "f=91&t=7549" reference even if there might be other things present before it or after it in the URL. The previous expression was accepting "any characters can appear before" and "any characters can appear after", but that's not fully correct.

What I've arrived at for solving this, and as a specific recommendation for what should work in your .htaccess, is:

Code: Select all

RewriteCond %{REQUEST_URI} /phpBB2/viewtopic\.php
RewriteCond %{QUERY_STRING} (?:^|&)f\=2\&t\=2(?:$|&) [NC]
RewriteRule .* "https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/" [R=302,L]
This will account for both the clean case of "viewtopic.php?f=91&t=7549", as well as the other cases where "viewtopic.php?something&f=91&t=7549&otherthing" appear in the URL.
Webmasterks wrote:
Mon May 27, 2019 9:46 am
is there a preferred place in the .htaccess where to put it?
Adding this to the .htaccess you showed from the /phpBB2 folder, down at the bottom where your existing HTTPS rewrite rule also appears, would be a fine place to put it. Such that the new rule appears after these existing lines:

Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* https://www.dekattensite.nl%{REQUEST_URI} [R,L]
So all of this still doesn't answer "why couldn't RedirectMatch also solve this", since it really seems like that should have worked too. Maybe someone smarter than us will see this and know the answer. Not that there is anything wrong with making a RewriteRule that performs a redirect.

Webmasterks
Registered User
Posts: 259
Joined: Tue May 27, 2003 11:28 pm
Location: The Hague, The Netherlands
Contact:

Re: Forum page redirect

Post by Webmasterks » Mon May 27, 2019 2:06 pm

EA117 wrote:
Mon May 27, 2019 1:19 pm
I got lost in trying to figure out the problem, I forgot to give you a more specific recommendation. 😁
I know what that feels like ;-)
Adding this to the .htaccess you showed from the /phpBB2 folder
But I'm going to put it in my root .htaccess. Shouldn't that work too?
So all of this still doesn't answer "why couldn't RedirectMatch also solve this", since it really seems like that should have worked too.
Or even a plain 301 redirect. If you type in the exact URL as specified in the redirect, that should work too, I guess, but it doesn't, so there's something else going on with redirecting a forum topic.

But thanks a million for coming up with a solution. I'm going to try it out and will let you know ;-)

User avatar
EA117
Registered User
Posts: 610
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Forum page redirect

Post by EA117 » Mon May 27, 2019 2:46 pm

Webmasterks wrote:
Mon May 27, 2019 2:06 pm
But I'm going to put it in my root .htaccess. Shouldn't that work too?
There is certainly a lot going on in that root .htaccess which has nothing to do with phpBB. Putting this change into the /phpBB2/.htaccess file instead "makes more logical sense" to me, given that the redirect we're talking about is itself also phpBB-specific. The existing HTTPS redirect rule at the end of the /phpBB2/.htaccess file is already unique to your site, so it's not like this additional rule would be "the first modification away from phpBB's default .htaccess file", either.

It might also make sense to keep it out of the root-level .htaccess, if it's presence might be misunderstood or discarded by whatever plug-ins you're referring to that maintain these Wordpress-related constructs currently in there.

But no, I don't see anything that makes me think "this wouldn't work if the new rule was simply placed at the end of the root-level .htaccess file." So if you still have some compelling reason to keep it in the root-level .htaccess instead, placing this new rule after the "# END WordPress" should work for this too. Not that I have tried your Wordpress-specific .htaccess file to confirm one way or the other.

Webmasterks
Registered User
Posts: 259
Joined: Tue May 27, 2003 11:28 pm
Location: The Hague, The Netherlands
Contact:

Re: Forum page redirect

Post by Webmasterks » Mon May 27, 2019 5:43 pm

That makes perfect sense to me, so I'll just put it in the phpbb .htaccess. If I have more similar redirects from my forum, do I just replicate the code for each redirect or can I combine them into one piece of code?

(sorry if I'm hogging way too much of your time).

User avatar
EA117
Registered User
Posts: 610
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Forum page redirect

Post by EA117 » Mon May 27, 2019 6:25 pm

Webmasterks wrote:
Mon May 27, 2019 5:43 pm
If I have more similar redirects from my forum, do I just replicate the code for each redirect or can I combine them into one piece of code?
Sometimes it does make sense to combine them, but that's only possible when the actual redirect URL is going to be similar.

For example, if you needed a rule in the future that forced everyone who accessed your forum to use the "www" subdomain, it would make a lot of sense to combine that with your existing HTTPS redirect. Because in either case -- absence of HTTPS or absence of the "www" subdomain -- the URL you want to redirect them to is exactly the same (https://www.dekattensite.nl/phpBB2/).

But in this case, for redirecting "viewtopic.php?f=91&t=7549", there is no way to combine that with other rules. Because the destination of that redirect is entirely unique, and not even related to your phpBB site. Unless you just happen to come up with another phpBB link that you want to redirect to the exact same Wordpress discussion, you'll never combine anything with that rule.

Edit:
EA117 wrote:
Mon May 27, 2019 1:19 pm
What I've arrived at for solving this, and as a specific recommendation for what should work in your .htaccess, is:

Code: Select all

RewriteCond %{REQUEST_URI} /phpBB2/viewtopic\.php
RewriteCond %{QUERY_STRING} (?:^|&)f\=2\&t\=2(?:$|&) [NC]
RewriteRule .* "https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/" [R=302,L]
This will account for both the clean case of "viewtopic.php?f=91&t=7549", as well as the other cases where "viewtopic.php?something&f=91&t=7549&otherthing" appear in the URL.
Holy cow. I bet you already caught it, but I had still missed putting your actual forum ID and topic ID in that rule. Used it everywhere in the discussion, but not in the most important place. 😝 I did mean of course that the rule in your case would have your forum and topic IDs:

Code: Select all

RewriteCond %{REQUEST_URI} /phpBB2/viewtopic\.php
RewriteCond %{QUERY_STRING} (?:^|&)f\=91\&t\=7549(?:$|&) [NC]
RewriteRule .* "https://www.dekattensite.nl/alles-over-de-kat/verzorging/koolhydraatarm-kattenvoer-katten-met-diabetes/" [R=302,L]

Post Reply

Return to “[3.2.x] Support Forum”