Hi,
I have just converted from VBulletin 3.8.5 (using convertor vbulletin37), I went to SMF v2.0 and then v2.1. I've got it all working at least 90-95% but can't let users back in until it's 100%. I have two main problems and one question for the experts!
Question: I hadn't thought about redirecting old VB URLs until now. Is it too late? If not, I'd be really grateful if someone could advise how I go about doing so.
2 Errors/Problems:
1. There is no option for users to attach photos to their posts, only to add an image from a URL. How do they get the 'attach' option? (I have been right through all admin options and settings and looks like attachments SHOULD be working, they are enabled.)
2. Strange issue with Smileys. I noticed with default theme (and default smileys set) there is ONLY ONE smiley available in the WYSIWYG editor?! I tried every other available set and then it shows between 1 and 6 smileys to choose from. There should be a whole selection surely? (I checked the Smileys folder on server, and there are 23 gifs shown in there, so I do have them on server.
The delay to users has been 4 times what they were told to expect, so if anyone has any ideas to help I would hugely appreciate it.
Thanks
attachments are controlled by permissions. Check the permissions set(s)
smilies...usually, I would say a URL problem or a javascript problem -- but for it to show ONE seems really odd.
URL?
Thanks, I am so grateful for the reply as I am really stumped with this and users want the boards back!
I am not as tech-skilled as many on here, so please forgive me...
When you say "check the permissions set(s)" - do you mean server file permissions or just the options in Admin settings?
Smilies - yes i thought it was really strange to show just the one or a few, but not the full set.
I can give the URL but it won't work your end as I had to edit my hosts file to view it, it's on a new hosting server. I can't think of a way to let you in without you editing hosts file, if you know a way I will gladly provide the info. The url for ME (with hosts file edit of "72.249.68.147 thehunterslife.com www.thehunterslife.com") is thehunterslife.com/newforums
PS In case relevant, I am running php7.3
Thanks again
file permissions would result in an error - not in the option being hidden.
So, it has to be an SMF permissions.
1- have you enabled attachments?
index.php?action=admin;area=manageattachments;sa=attachments
2- have you confirmed that the usergroup has permission?
one of these set to ALLOW -- with NO group set to DENY
Post attachments, but hide until approved
Post attachments, without requiring approval
Can't get to your site from my current computer... I'll have to check from another later
Thank you :)
Yep to number 1.
I think so, to number 2 but will go check and update here to confirm
Really grateful for your help. 2 pictures attached since you can't log in, one showing attachments enabled and the other showing a post editor. That's the most smileys I can get (think its 'Aaron' set), and I don't see that nice option like I see on this board to "Click or drag files here to attach them."
Images are a big deal to these users so hopefully I can suss it. Will update shortly. Thank you again.
Hmm, I am quite new to SMF, but wonder if I have spotted something re attachments permissions.
First I have attached a screenshot below, entitled General Permissions Regular Members - showing regular members can post attachments. But when I went to Manage Membergroups, I see groups: Administrator, Global Moderator, Moderator. I don't see a "Regular Members" group. Being new to SMF I am not sure if that's normal, or could that be the issue?
Thanks
no. Regular Members is not an actual group -- it's the DEFAULT permission set for any user who does not have a primary group set.
Your display of the quick reply window actually suggests that there may be a javascript error after all -- it looks like the system craps out the display after a specific smiley
Regarding attachments again -- there is no attachment option in quick reply -- only in the full reply or new post window.
Oh dear oh dear. I am 90% sure we never had an attachment field in the full reply dialogue (rather than quick reply), been playing for days and haven't seen it, but NOW it's there! Before I opened this thread I ran "repair_settings.php" and guessed my way through some slight edits in there, maybe that resolved it. But most importantly, attachments now appear to be working so THANK YOU!!
I still don't like the way it's displayed though. I want them full screen under posts and WISH they could be put inline between paragraphs of a post rather than only under signature, is that in any way possible? I assume not but always worth asking as I am new to SMF and just learning the ropes. (I'd also like to get rid of the visible file names on attachments as some users won't use that)
javascript error - maybe that's it. I didn't even know SMF used any javascript! (I am no dev, in case you hadn't noticed!) Do you have any idea where to begin in finding and solving the problem?
Thanks
PS I spotted this option in Attachment Settings, and don't understand it:
Do not show attachments under the post if they are already embedded in it.
Enable this if you do not want attachments to appear twice. Attachments embedded in the post still count towards attachment limits and can still be treated like normal attachments.
I don't see any way TO "embed" attachments inside a post! Is there a way after all?!
in 2.1, yes.... you can click the INSERT icon when you drag/upload the image into the message window.... it will place the image marker where ever the cursor is
That's fantastic thank you so much!
Is there any kind of online tool I can use to test whether I have a javascript error or not, re the Smileys?
right click on your page and select "inspect" then choose the console option.... see if it gives any warnings or errors when you reload the page with the post editor on it
Thanks. I did that and it says "No Issues"
The forum is not live on a domain yet (domain pointed to old forum at different host). I noticed 72 errors in error log. I cleared them. 30 minutes later I noticed two new ones. No idea what they mean or how they are caused, just concerned something may be wrong with the forum. Will attach screenshot below, grateful if someone could confirm whether i need to worry about these types of errors or not?
thanks
Undefined index errors don't usually cause performance problems, but shouldn't be there. If you don't have any mods or customizations running, might be a good idea to upload a clean set of 2.1.4 files.
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Database will not be affected.
Kaspersky is giving me an untrustworthy website warning at all three links you posted due to invalid certificate.
Quote from: Sir Osis of Liver on June 21, 2023, 10:44:32 PMUndefined index errors don't usually cause performance problems, but shouldn't be there. If you don't have any mods or customizations running, might be a good idea to upload a clean set of 2.1.4 files.
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Database will not be affected.
Thanks for replying. That is depressing, that they shouldn't be there. I will look into doing as you say, will if I can, but under so much pressure to get this ready for users now and the problems don't stop coming!
Do you have any ideas about the smileys not showing?
SSL - yes, it was messy old hosting which is now gone. Domain pointed to new hosting 12 hours ago so the site is now visible at https://forum.thehunterslife.com/ (maintenance mode). If anyone can assist with the issues, I'd happily provide admin login by PM.
Thanks
Oh and PS, I have attached another screenshot I took of one of those errors (expanded)
That fresh install sounds too complex for me sadly. Various parts aren't explained well enough (for ME!), such as :
"Extract the archive to the forum's directory, making sure that you delete upgrade.php and all the upgrade-x.x.sql files, and overwrite index.php, the sources folder, and the themes folder."
Does this mean upload the zip and extract it ON the server?
Delete upgrade.php - from which set of files, original or newly extracted?
overwrite index.php - how? with what?
"Optional step: Warning: do not undertake this step unless you know what you are doing! Before you upload the fresh set of files, you can also remove Sources and Themes folders. Doing this ensures there are no files left behind and that your setup is completely clean." - Sounds pretty important, but how do I know if I know what I am doing?! I do, I am 'removing sources and themes folders'?!
It doesn't mention whether options will be setback to defaults, we spent hours setting up all settings/options, but other than that the site is 100% stock/defaut, no mods or custom themes or any other customizations.
Any chance you could give me a list of which options you'd recommend from that link, and maybe clarify how I actually do it. I have run repair_settings.php, upgrade.php etc. So I am at least capable of extracting zips (both on and off the server), but I can't risk buggering things up by rushing through some instructions i don't really understand :) (which is no doubt due to my own ignorance or lack of knowledge)
ok.... simplified
1- make a backup using the hosting CPanel. (just in case)
2- delete the Sources Directory, the Themes Directory and the index.php file from the forum root.
2a- DO NOT DO NOT DO NOT DO NOT delete Settings.php!!!!!!!
3- Upload the upgrade.zip file
4- extract in place - choosing the "overwrite" option for any conflicting files that remain.
5- delete upgrade.php and the .SQL files that were part of the unzip on your server
Your settings, messages, users, etc will be untouched. Those are in the database, not the files.
Your attachments should remain untouched because you did not remove the attachments directories.
Fantastic, I can do THAT! THANK YOU 'KINDLY' :) :)
I noticed another error in log which may be related, and based on reading other threads (translating from French!) I think it's related to the fact we changed the attachments setting from Manual - SMF Default to organise folders by "years and months". Short version, the admin error shows as :
"The path to the attachments directory (/home/hqb1ejsk2lyo/forum.thehunterslife.com/attachments/445_59da95f28f02de5ac4111529659f770de1af7f8e.dat) is incorrect. Please correct it in the attachment settings area of your admin panel."
I ran repair_settings and that is "recommended". But I am not sure it exists on the forum (And for some reason Cpanel file manager won't let me see inside Attachments folder (have asked host for a reason for that). I CAN see that the permission on "Attachments" directory is 0755. (Pic attached taken from repair_settings.php script)
Should I change back to Manual - SMF Default? (I would prefer year/month ideally)
Or do you have any other suggestions?
Should I resolve before following the 'fresh set of files' routine above, or vice versa?
THANK YOU
do your file reset first, then we can deal with the attachment ordering
Wasn't sure how quick someone would be able to reply, so in the mean time I contacted my host as I am actually having problems just accessing the "Attachments" folder inside Cpanel File Manager! That made me wonder if there's another issue, or incorrect permissions maybe. They are investigating briefly and asked me not to do anything for half an hour while they look into it.
I will let them finish checking what's wrong with File Manager, and as soon as they log out I will do the file reset and come back. Thanks very much
Ok, I did the refresh. not sure it needed it, but always feel good to refresh stuff, even if it's only a few days old :D
Ok, I ran repair_settings.php again. Same issue, which the host's dev thinks is an error, as .dat isn't a folder, it's a file.
In repair settings I have TWO entries for 'Attachment Directory':
/home/hqb1ejsk2lyo/forum.thehunterslife.com/attachments
/home/hqb1ejsk2lyo/forum.thehunterslife.com/attachments/445_59da95f28f02de5ac4111529659f770de1af7f8e.dat
Surely that's wrong? But not sure how to fix, do I just clear it out and save?
I suspect I caused this a few days ago by changing attachments handling settings from Manual-SMF-Default to Year/Month which seemed more logical and nicer for admins. But it's not vital, so if needed I can just put it back to Manual-SMF-Default.
If someone could confirm I'd be grateful, thanks
Screenshot of Attachments and Avatars settings pane:
Screenshot 2023-06-22 at 15.01.06.png
I can't find a way to delete that bottom path (which ends in .dat)
How are these deleted, does it have to be done in code somewhere?
The .dat file is one of the attachment files. It should not be showing up as an attachment directory.
To remove it from that list, first set the original directory to be the "current" one. Then you should be able to remove the incorrect entry.
More generally, since only the main attachments directory actually exists at this point, it would be best to change the setting back to using a single attachments directory for now. Once you have everything else up and running satisfactorily, you can then change how you want the attachments to be stored.
Thank you very much Seksi (hope you don't mind me calling you that, I am eating at the moment and sick of cleaning my keyboard every time I read your thread replies outloud :D)
perfect, worked. but before I couldn't select the original one to be "current", it was all greyed out. Maybe it's because I just changed back to ManualSMFDefault. Anyway, looks sorted. Will keep an eye on error log for the next debacle :D
Thank you
Ha, that should've been spelled SeSKi, not Seksi. Freudian slip I guess. ;D ;D ;D
Thanks all. Progress today, fixed the smileys too :)
Two questions if I may:
1. I hadn't thought about redirecting old VB URLs until now. Is it too late? If not, I'd be really grateful if someone could advise how I go about doing so.
2. I am playing with a few themes I have downloaded. I want to make some edits to them, link colours are hard to read and a few other things. I may end up making quite a few changes once I learn a bit about CSS. I'd like to know if that's 'ok' to do? I don't want to break any rules or offend anyone, so is it ok to edit a downloaded template? If so, should I rename it to avoid people judging the creator on my edits! Or should I not do that? Just looking for advice on the etiquette of all this, new to me :)
thanks again
OoH. I just noticed one of the themes I installed says only compatible up to 2.0.5, I am on 2.1.4. It all seems to be working though. Is it ok to use it, or is it best to uninstall that and stick to ones that say 2.1.4 compatible?
Themes for 2.0.x are likely gonna be broken in various places if you install them in 2.1
And between patches some have had slight template edits so your best bet is to pick a theme compatible with 2.1.4 or at least 2.1.3
As for edits, no problem. Once you download it, you're free to edit as you see fit.
The only exception is copyright...
If a theme or mod has a copyright Statement, you can't edit that
As Diego said, though, Themes for 2.0 won't work right on 2.1
Regarding redirects... I don't think there is any good way to do a one for one redirect on messages.
Quote from: Kindred on June 23, 2023, 03:23:26 AMIf a theme or mod has a copyright Statement, you can't edit that
Most of my customizations have been quite different from original theme. I've always done this -
SMF 2.0.19 | SMF © 2021, Simple Machines
smf destek | Customized by Krash
Wouldn't think that would be a problem for theme author.
Quote from: Sir Osis of Liver on June 23, 2023, 12:46:32 PMQuote from: Kindred on June 23, 2023, 03:23:26 AMIf a theme or mod has a copyright Statement, you can't edit that
Most of my customizations have been quite different from original theme. I've always done this -
SMF 2.0.19 | SMF © 2021, Simple Machines
smf destek | Customized by Krash
Wouldn't think that would be a problem for theme author.
(In some themes/mods, you can remove the copyright, in some you can not, depending on the license)
You can also add your own stuff before or after... but you can not EDIT someone else's copyright statement
Quote from: MartyHunter on June 22, 2023, 10:45:18 PM1. I hadn't thought about redirecting old VB URLs until now. Is it too late? If not, I'd be really grateful if someone could advise how I go about doing so.
Never too late in my opinion ...
I migrated a VB forum to SMF just over six years ago (https://www.simplemachines.org/community/index.php?msg=3933553) and have left the redirects in place because this serves a number of purposes:
1. Firstly, and most importantly in my opinion, it ensures that internal links (ie, within forum posts) effectively remain valid (I thought it was particularly important that anyone - but especially forum members who may be feeling challenged by the change in forum software - could click on a forum link and be taken to the relevant content rather than a 404 page);
2. External links (eg, from other forums, websites,in email messages, etc) to the forum are directed to the relevant content; and
3. Links returned by search engines are redirected correctly (they eventually re-index the forum).
You'll need to update the .htaccess file for your forum - details on the rules
@hydtah and I used can be found in the following messages:
Success Story from vBulletin 3.8 to SMF 2.0.15 with 670,000 Posts (https://www.simplemachines.org/community/index.php?topic=564497.0)
Success Story - vBulletin 4.2.0 to SMF 2.0.14 (https://www.simplemachines.org/community/index.php?msg=4002866)
Weird, I have subscription turned on but didn't get any notifications for the many helpful posts above. Sorry, and thanks. Reading through now. Thanks again
Quote from: GL700Wing on June 23, 2023, 10:11:42 PMYou'll need to update the .htaccess file for your forum - details on the rules @hydtah and I used can be found in the following messages:
Success Story from vBulletin 3.8 to SMF 2.0.15 with 670,000 Posts (https://www.simplemachines.org/community/index.php?topic=564497.0)
Success Story - vBulletin 4.2.0 to SMF 2.0.14 (https://www.simplemachines.org/community/index.php?msg=4002866)
Thanks for this. I took a look (3.8 as I was on 3.8.5), I don't understand code, I do know what an .htaccess file is and does, but have only ever pasted stuff in, I don't actually know what it all means.
I notice on that topic they say they used that htaccess file 'with some edits'.
Any chance you could tell me what edits I need to do? I'd love to redirect our old VB urls, there are links within topics to other topics which carried over from vB, but don't work on the new url structure. Aside from SEO issues, it would be nice not to have to trawl tens of thousands of posts to manually edit those links! :D
Grateful if you could give me a brief heads up on what I actually need to do/edit to benefit from this useful redirect? Thanks very much
Quote from: MartyHunter on July 02, 2023, 08:23:01 AMI notice on that topic they say they used that htaccess file 'with some edits'.
With the exception of the added 'NE' to the third 'RewriteRule' (which is required) the two sets of rules are identical.
QuoteAny chance you could tell me what edits I need to do? I'd love to redirect our old VB urls, there are links within topics to other topics which carried over from vB, but don't work on the new url structure. Aside from SEO issues, it would be nice not to have to trawl tens of thousands of posts to manually edit those links!
Update the path name in the rules to match the path name for your forum (ie, change
'smf_forum' to the name of the directory/folder you installed the forum in) and copy the rules into the .htaccess file in your website's root directory/folder.
Once you've done that check some forum posts to work out if old links are redirecting correctly.
RewriteEngine On
RewriteBase /
Redirect /index.htm /smf_forum/
# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?showthread.php$ /smf_forum/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?showthread.php$ /smf_forum/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?forumdisplay.php$ /smf_forum/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?newthread.php$ /smf_forum/index.php?board=%1.0 [L,R=301]
# SMF rewrite for cms author
RewriteCond %{QUERY_STRING} ^author/([0-9]+)-.*/?$ [OR]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
RewriteRule ^cms/list.php$ /smf_forum/index.php?action=profile;u=%1? [L,R=301]
# SMF rewrite for calendar
RewriteRule ^calendar\.php /smf_forum/index.php?action=calendar? [L,R=301]
# Rewrite all non-existent directories and folders to /smf_forum/index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /smf_forum/index.php? [QSD,L,R=301]
THANK YOU
Does that mean your problem is resolved?
Quote from: GL700Wing on July 03, 2023, 06:18:16 PMQuote from: MartyHunter on July 02, 2023, 08:23:01 AMI notice on that topic they say they used that htaccess file 'with some edits'.
With the exception of the added 'NE' to the third 'RewriteRule' (which is required) the two sets of rules are identical.
QuoteAny chance you could tell me what edits I need to do? I'd love to redirect our old VB urls, there are links within topics to other topics which carried over from vB, but don't work on the new url structure. Aside from SEO issues, it would be nice not to have to trawl tens of thousands of posts to manually edit those links!
Update the path name in the rules to match the path name for your forum (ie, change 'smf_forum' to the name of the directory/folder you installed the forum in) and copy the rules into the .htaccess file in your website's root directory/folder.
Once you've done that check some forum posts to work out if old links are redirecting correctly.
RewriteEngine On
RewriteBase /
Redirect /index.htm /smf_forum/
# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?showthread.php$ /smf_forum/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?showthread.php$ /smf_forum/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?forumdisplay.php$ /smf_forum/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?newthread.php$ /smf_forum/index.php?board=%1.0 [L,R=301]
# SMF rewrite for cms author
RewriteCond %{QUERY_STRING} ^author/([0-9]+)-.*/?$ [OR]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
RewriteRule ^cms/list.php$ /smf_forum/index.php?action=profile;u=%1? [L,R=301]
# SMF rewrite for calendar
RewriteRule ^calendar\.php /smf_forum/index.php?action=calendar? [L,R=301]
# Rewrite all non-existent directories and folders to /smf_forum/index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /smf_forum/index.php? [QSD,L,R=301]
Hi again, sorry I have only just found time to address this and try your htaccess rules. Before I begin, I can't actually see an htaccess file in the forum folder. There is one on the domain's root (in public_html). Is that the one I should be editing?
If so, before I do, the current one has the following contents:
<FilesMatch \.php$>
SetHandler proxy:fcgi://hqb1ejsk2lyo-php73
</FilesMatch>
Should I delete that, or append the file somehow?
Thanks
Quote from: MartyHunter on August 10, 2023, 08:11:28 PM...
There is one on the domain's root (in public_html). Is that the one I should be editing?
Should I delete that, or append the file somehow?
Edit the existing .htaccess file that is in the root folder (ie, public_html) of the website and add the new rules to the beginning of the file.
Thanks. I am still not 100% clear.
1. Do I paste in that ENTIRE section of code in your post?
2. You say to edit the 'path'. I see the third line in the code says "Redirect /index.htm /smf_forum/"
I assume that's the first instance where I change the path. But my forum is not in a sub folder, it's on a subdomain at 'forum.domain.com'. How do I change the path to reflect that?
thanks
Even subdomains have a server PATH... path != url
Quote from: MartyHunter on August 10, 2023, 09:03:26 PM1. Do I paste in that ENTIRE section of code in your post?
Yes.
Quote2. You say to edit the 'path'. I see the third line in the code says "Redirect /index.htm /smf_forum/"
I assume that's the first instance where I change the path. But my forum is not in a sub folder, it's on a subdomain at 'forum.domain.com'. How do I change the path to reflect that?
Your forum is at forum.thehunterslife.com
So the rules you need to add to .htaccess are (ie,
every occurrence of
'smf_forum' is replaced with
'forum.thehunterslife.com'):
RewriteEngine On
RewriteBase /
Redirect /index.htm /forum.thehunterslife.com/
# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?showthread.php$ /forum.thehunterslife.com/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?showthread.php$ /forum.thehunterslife.com/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?forumdisplay.php$ /forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$
RewriteRule ^(forum)?/?newthread.php$ /forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]
# SMF rewrite for cms author
RewriteCond %{QUERY_STRING} ^author/([0-9]+)-.*/?$ [OR]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
RewriteRule ^cms/list.php$ /forum.thehunterslife.com/index.php?action=profile;u=%1? [L,R=301]
# SMF rewrite for calendar
RewriteRule ^calendar\.php /forum.thehunterslife.com/index.php?action=calendar? [L,R=301]
# Rewrite all non-existent directories and folders to /forum.thehunterslife.com/index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /forum.thehunterslife.com/index.php? [QSD,L,R=301]
thank you very much
Quote from: MartyHunter on August 10, 2023, 09:57:19 PMthank you very much
Actually - just realised those rules may not be correct if your previous forum was also at
forum.thehunterslife.com.
Basically you will also need to change all the
'(forum)' references to whatever the address of your previous forum was (eg,
'(forum.thehunterslife.com)').
You'll know the rules are correct if when you click on an old forum link it takes you to the current forum address rather than an error page.
Thanks, kind of you to notice.
No, the old forum was domain.com/forums/
new is forum.domain.com
Thanks again
Quote from: MartyHunter on August 11, 2023, 10:11:56 AMThanks, kind of you to notice.
No, the old forum was domain.com/forums/
new is forum.domain.com
Thanks again
Okay - then you probably need to change
(forum) to
(forums) and
without the domain name.
Oh! I just noticed something, in your post (#46) above, you kindly made some replacements for me! That was too kind man, really grateful for this.
I didn't even notice until now!
Quote from: MartyHunter on August 11, 2023, 08:56:45 PMOh! I just noticed something, in your post (#46) above, you kindly made some replacements for me! That was too kind man, really grateful for this.
I didn't even notice until now!
You're welcome!
Quote from: MartyHunter on August 11, 2023, 08:56:45 PMThat was too kind man
Just for future reference, GL is a woman. ;)
Ok I updated the .htaccess file with GL's kindly edited code above, but redirects aren't working.
I get an error saying: "This page isn't working www.thehunterslife.com redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS"
The code I added to the .htaccess file is:
RewriteEngine On
RewriteBase /
Redirect /index.htm /forum.thehunterslife.com/
# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ /forum.thehunterslife.com/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ /forum.thehunterslife.com/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?forumdisplay.php$ /forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?newthread.php$ /forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]
# SMF rewrite for cms author
RewriteCond %{QUERY_STRING} ^author/([0-9]+)-.*/?$ [OR]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
RewriteRule ^cms/list.php$ /forum.thehunterslife.com/index.php?action=profile;u=%1? [L,R=301]
# SMF rewrite for calendar
RewriteRule ^calendar\.php /forum.thehunterslife.com/index.php?action=calendar? [L,R=301]
# Rewrite all non-existent directories and folders to /forum.thehunterslife.com/index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /forum.thehunterslife.com/index.php? [QSD,L,R=301]
The test I am doing is to go here: https://forum.thehunterslife.com/index.php?topic=20657.msg154963#msg154963 and click on the link at the top of the page to another thread. That link was created in vBulletin, so it's a good test. It seems I've gone wrong somewhere, grateful for any hints.
Thanks muchly
PS Just a reminder, the old forum was at thehunterslife.com/forums/
New one is at forum.thehunterslife.com
Quote from: MartyHunter on August 13, 2023, 06:41:48 PMOk I updated the .htaccess file with GL's kindly edited code above, but redirects aren't working.
Try this set of rules (basically I've added
https:/ to the beginning of every piece of
/forum.thehunterslife.com code).
RewriteEngine On
RewriteBase /
Redirect /index.htm /forum.thehunterslife.com/
# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?forumdisplay.php$ https://forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?newthread.php$ https://forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]
# SMF rewrite for cms author
RewriteCond %{QUERY_STRING} ^author/([0-9]+)-.*/?$ [OR]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
RewriteRule ^cms/list.php$ https://forum.thehunterslife.com/index.php?action=profile;u=%1? [L,R=301]
# SMF rewrite for calendar
RewriteRule ^calendar\.php https://forum.thehunterslife.com/index.php?action=calendar? [L,R=301]
# Rewrite all non-existent directories and folders to https://forum.thehunterslife.com/index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ https://forum.thehunterslife.com/index.php? [QSD,L,R=301]
Pasted that in instead, and I thought it had fixed it, but I still have issues.
The original example is working - https://forum.thehunterslife.com/index.php?topic=20657.msg154963#msg154963 (click the link, working nicely now)
But another one isn't working, i wonder if its due to the 'type' of link, in other words is one type a Vbulletin type and the other SMF type? Ah, maybe not, both were generated back on vBulletin years before we installed SMF.
The link in this post fails to open: https://forum.thehunterslife.com/index.php?topic=9917.msg66173;topicseen#msg66173
Any ideas appreciated. Thanks
PS in case error message is helpful here:
"Parse error: syntax error, unexpected 'new' (T_NEW) in /home/hqb1ejsk2lyo/public_html/forums/includes/init.php on line 55"
Quote from: MartyHunter on September 17, 2023, 01:28:20 PMBut another one isn't working, i wonder if it's due to the 'type' of link, in other words is one type a Vbulletin type and the other SMF type? Ah, maybe not, both were generated back on vBulletin years before we installed SMF.
The link in this post fails to open: https://forum.thehunterslife.com/index.php?topic=9917.msg66173;topicseen#msg66173
What is the equivalent SMF content type (ie, topic or message) that the link http://thehunterslife.com/forums/showthread.php?p=66165#post66165 refers to?
Also, please attach a copy of your .htaccess file.
The error message includes a path to an
'includes' folder/directory and this is not a standard SMF folder/directory so I'm wondering what is causing that link to get redirected to
'./forums/includes/init.php'
Sorry am not sure if I understood your first question. Equivalent content type? It looks like a link to a specific post/reply under a topic (as opposed to just being a link to a topic). Is that what you meant?
.htaccess file contents are:
RewriteEngine On
RewriteBase /
Redirect /index.htm /forum.thehunterslife.com/
# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?forumdisplay.php$ https://forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?newthread.php$ https://forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]
# SMF rewrite for cms author
RewriteCond %{QUERY_STRING} ^author/([0-9]+)-.*/?$ [OR]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
RewriteRule ^cms/list.php$ https://forum.thehunterslife.com/index.php?action=profile;u=%1? [L,R=301]
# SMF rewrite for calendar
RewriteRule ^calendar\.php https://forum.thehunterslife.com/index.php?action=calendar? [L,R=301]
# Rewrite all non-existent directories and folders to https://forum.thehunterslife.com/index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ https://forum.thehunterslife.com/index.php? [QSD,L,R=301]
<FilesMatch \.php$>
SetHandler proxy:fcgi://hqb1ejsk2lyo-php73
</FilesMatch>
Re the error referring to line 55 of that file on server (init.php). Lines 54 and 55 read as follows:
// initialize the data registry
$vbulletin =& new vB_Registry();
thanks for trying to help, really annoying this as people often use these links to specific posts to get related content on complex topics, so they are darn useful!
Quote from: MartyHunter on September 18, 2023, 11:18:30 AMSorry am not sure if I understood your first question. Equivalent content type? It looks like a link to a specific post/reply under a topic (as opposed to just being a link to a topic). Is that what you meant?
OK - I've worked out that you need to add another rule to your .htaccess file:
Find:
# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
Add After:
RewriteCond %{QUERY_STRING} ^p=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?msg=%1 [L,R=301]
QuoteRe the error referring to line 55 of that file on server (init.php). Lines 54 and 55 read as follows:
This indicates to me that you still have the vBulletin forum software installed and running and in situations like this it only creates confusion. To ensure that SMF is the
only active forum software I'd suggest that you either take a backup of the vBulletin
'forums' directory/folder and then delete it, or rename it to something else (eg,
'vb.forums').
Thank you.
I did as you said, I deleted the old "forums" subfolder which I had forgotten was sat on the server taking up space (1.4GB!) and I added those two lines of code into the .htaccess file.
That second example link which wasnt working is now working so I am hoping that's solved it. I will have a check around for any others but fingers crossed it's sorted.
One point I maybe should have mentioned (maybe not relevant if your instructions above fixed it) is that the new forum is at forums.domain.com, yet the .htaccess file is in the public_html folder (which in my mind is not in the right place to impact on the files in the forums.domain.com folder. But I am probably talking trash as it seems to work so far!
Thanks again. I will make as solved and re-open if I notice any more problems.
Quote from: MartyHunter on September 20, 2023, 09:37:55 PMI did as you said, I deleted the old "forums" subfolder which I had forgotten was sat on the server taking up space (1.4GB!) and I added those two lines of code into the .htaccess file.
Great - you've got some more disk space and hopefully solved the last redirection issue.
QuoteThat second example link which wasnt working is now working so I am hoping that's solved it. I will have a check around for any others but fingers crossed it's sorted.
I actually checked the forum I migrated from vBulletin a few years ago and even though I couldn't find any links like the one you had that wasn't working I was able to work out the extra rule you needed.
That said, I did find a few links that weren't redirecting correctly and I had to change one of the existing rules - for your site you need to change the following:
From:
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]
To:
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&p=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]
QuoteOne point I maybe should have mentioned (maybe not relevant if your instructions above fixed it) is that the new forum is at forums.domain.com, yet the .htaccess file is in the public_html folder (which in my mind is not in the right place to impact on the files in the forums.domain.com folder.
This is where this .htacecss file is on my migrated forum and it has always worked so I figure it's in the right location for my situation. If you want you could
move it to sub-domain folder/directory and see if it still works there ...
QuoteThanks again. I will make as solved and re-open if I notice any more problems.
You're welcome ...
Thanks, you're a diamond. I've made that adjustment too and those two links are still working so hopefully all will be well. Will post back if any further problems are spotted. Extremely grateful for the help here.