XF 2.1 htaccess help

LondonDragon

Active member
Hi guys,

I am trying to redirect some old URLs to pages on the forum and I am getting a little stuck.

This is the old URL:
Code:
https://www.ukaps.org/index.php?page=dosing-with-dry-salts

This is the new URL:

Code:
https://www.ukaps.org/forum/pages/dosing-with-dry-salts

Any help appreciated

Many thanks :)
 
Many thanks, the issue is various pages that start with index.php?page=[page title]

Then it just redirects it as index.php and ignores this section ?page=[page title] which doesnt work then :(
 
Can anyone help me?

I'm trying to get old vB4 thread pages (page#2, #3, #4 etc) to redirect to XF2.1 and can't seem to get it.

Can anyone see where I'm going wrong?

First try - doesn't work
Code:
RewriteCond %{QUERY_STRING} t=([0-9]+)&page=([0-9]+)(&|$)
RewriteRule showthread\.php$ https://www.mysite.com/threads/%1/page-%2? [R=301,L]

Second try - also doesn't work
Code:
RewriteCond %{QUERY_STRING} (^|&|\?)t=([0-9]+)&page=([0-9]+)(&|$)
RewriteRule ^showthread\.php$ https://www.mysite.com/threads/%2/page-%3? [R=301,L]

Thanks for any assistance.
 
Can anyone help me?

I'm trying to get old vB4 thread pages (page#2, #3, #4 etc) to redirect to XF2.1 and can't seem to get it.

Can anyone see where I'm going wrong?

First try - doesn't work
Code:
RewriteCond %{QUERY_STRING} t=([0-9]+)&page=([0-9]+)(&|$)
RewriteRule showthread\.php$ https://www.mysite.com/threads/%1/page-%2? [R=301,L]

Second try - also doesn't work
Code:
RewriteCond %{QUERY_STRING} (^|&|\?)t=([0-9]+)&page=([0-9]+)(&|$)
RewriteRule ^showthread\.php$ https://www.mysite.com/threads/%2/page-%3? [R=301,L]

Thanks for any assistance.

Why are you not simply using the VB redirection script that's documented in the Xenforo online manual, and available in the Resources?
 
This is what I use for query URLs and works. Not sure about that = sign though

Code:
RewriteCond   %{REQUEST_URI}    ^/index.php$
RewriteCond   %{QUERY_STRING}   ^page=dosing-with-dry-salts$
RewriteRule   ^(.*)$ https://www.ukaps.org/forum/pages/dosing-with-dry-salts/   [R=301,L]
 
Back
Top Bottom