Brocken internal links in posts

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
PELP
Registered User
Posts: 57
Joined: Sun Nov 22, 2015 4:14 pm
Name: Poul Erik Lind Pedersen

Brocken internal links in posts

Post by PELP » Thu Jan 18, 2018 10:30 am

I am admin for a Danish board, dfac.dk/fritforum. I have a serious, probably self inflicted, problem with brocken, internal links in posts that I hope there is a simple solution for.

Until recently we ran our forrum as a subdomain ie. fritforum.dfac.dk. I have upgraded to php 7.0, phpbb 3.2 and implemented SSL. To get SSL to work, i found it necessary to change the main link to https://dfac.dk/fritforum and by adding a redirect to .htaccess I got all variations of fritforum.dfac.dk and dfac.dk/fritforum to work as the main URL. So far so good.

Now I have found a problem that I think I know the reason for, but I can´t find a quick fix. All internal links in posts are brocken and just lead to the boards home page. I think the reason is, that when people post and want to link to some other post on the board, they just type or copy the URL without using the link bbcode. Alle internal links to uploaded dokuments, pictures and so on, have automatically been changed, but the direct links in posts have not been, and the redirect obviously doesn´t solve this. So now I have almost 16000 posts with potentially brocken links. HELP please.

janus_zonstraal
Registered User
Posts: 2270
Joined: Sat Aug 30, 2014 1:30 pm

Re: Brocken internal links in posts

Post by janus_zonstraal » Thu Jan 18, 2018 11:31 am

All internal links in posts are brocken and just lead to the boards home page. I think the reason is, that when people post and want to link to some other post on the board, they just type or copy the URL without using the link bbcode.
If that is the reason, I think the best way is to copy your board and database.
En try a search and replace on the test database on the old url

If it is working you can do it on your live board.
Sorry! My English is bat ;) !!!

PELP
Registered User
Posts: 57
Joined: Sun Nov 22, 2015 4:14 pm
Name: Poul Erik Lind Pedersen

Re: Brocken internal links in posts

Post by PELP » Fri Jan 19, 2018 10:38 am

Thanks for the reply Janus. I hadn´t seen your reply before I tried that solution, and it worked.

I loaded a copy of the database into Wordpad and did a "search and replace" - first for 'fritforum.dfac.dk' to 'dfac.dk/fritforum' and then for 'http://dfac' to 'https://dfac'. The first one alone was not enough, but after the second run it worked.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: andares, andrewilley, janus_zonstraal and 27 guests