Smileys & Attachments option not showing - Really could use a bit of help please

Started by MartyHunter, June 21, 2023, 10:17:57 AM

Previous topic - Next topic

Steve

DO NOT pm me for support!

MartyHunter

Quote from: GL700Wing on July 03, 2023, 06:18:16 PM
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]


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

GL700Wing

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.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

MartyHunter

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

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GL700Wing

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]
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas


GL700Wing

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.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

MartyHunter


GL700Wing

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.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

MartyHunter

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!

GL700Wing

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!
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Steve

DO NOT pm me for support!


MartyHunter

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

GL700Wing

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]
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

MartyHunter

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

MartyHunter

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"

GL700Wing

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'
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: