[Solved] New URLs and absolute/relative links
[Solved] New URLs and absolute/relative links
There is an unexpected draw back with the new URLs: if you log on the new URL and click on a link to another post that was written using the old address you'll go to that old address... and will be logged out.
While this redirection problem is solved (I reported it on the dev mailing lists yesterday) there is one thing we can do to alleviate it: use relative URLs to cross reference posts.
The problem is that phpBB do not offer relative links by default, but this feature is easy to implement as a custom tag. I followed this post and added the relative URL tags on the ES forums: they work perfectly.
Of course this will not solve the problem of existing links, this can only be solved by a proper redirect, but I think it is a good idea to always use relative links on the forum from now on. What do you think?
Regards
While this redirection problem is solved (I reported it on the dev mailing lists yesterday) there is one thing we can do to alleviate it: use relative URLs to cross reference posts.
The problem is that phpBB do not offer relative links by default, but this feature is easy to implement as a custom tag. I followed this post and added the relative URL tags on the ES forums: they work perfectly.
Of course this will not solve the problem of existing links, this can only be solved by a proper redirect, but I think it is a good idea to always use relative links on the forum from now on. What do you think?
Regards
Last edited by RGB on Wed Aug 15, 2012 7:03 pm, edited 1 time in total.
There are two types of people: those who believe that there are two types of people and those who do not.
openSUSE Leap with KDE Plasma / LibreOffice
openSUSE Leap with KDE Plasma / LibreOffice
- Hagar Delest
- Moderator
- Posts: 32627
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: New URLs and absolute/relative links
Sounds good, it would spare some work in the future I guess.
I've added the tag (appear on the right of the BBCodes top of the message area.
Is it the correct string?
link to the post above seems to work fine.
I've added the tag (appear on the right of the BBCodes top of the message area.
Is it the correct string?
Code: Select all
[rel=viewtopic.php?f=102&t=55691]link to the post above[/rel]
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Re: New URLs and absolute/relative links
At least it is the same string I used on the ES forumHagar Delest wrote:Is it the correct string?
There are two types of people: those who believe that there are two types of people and those who do not.
openSUSE Leap with KDE Plasma / LibreOffice
openSUSE Leap with KDE Plasma / LibreOffice
Re: [Solved] New URLs and absolute/relative links
This substitution is pretty straight forward for someone who has command line access to the MySQL database. Perhaps Imacat can do this for you.RGB wrote:Of course this will not solve the problem of existing links
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
Re: [Solved] New URLs and absolute/relative links
Hy, Terry! Nice to read you again.
I think there are two situations, one straightforward, the other not so.
The straightforward situation is a properly formatted url tag used to cross reference another thread: in this situation, changing url=http://....../viewtopic..... with rel=viewtopic...... and the corresponding /url with a /rel is enough. But the problem is that most people do not format the urls, they just copy paste them. To change a simple
to a relative address several changes needs to be done. Maybe if a "lone url" is found, then use the "viewtopic...." as link text:
Some regexp magic is needed.
Also, AFAIK the rel tag is only used here and on the ES forum.
I think there are two situations, one straightforward, the other not so.
The straightforward situation is a properly formatted url tag used to cross reference another thread: in this situation, changing url=http://....../viewtopic..... with rel=viewtopic...... and the corresponding /url with a /rel is enough. But the problem is that most people do not format the urls, they just copy paste them. To change a simple
Code: Select all
http://forum.openoffice.org/en/forum/viewforum.php?f=76
Code: Select all
[rel=viewforum.php?f=76]viewforum.php?f=76[/url]
Also, AFAIK the rel tag is only used here and on the ES forum.
There are two types of people: those who believe that there are two types of people and those who do not.
openSUSE Leap with KDE Plasma / LibreOffice
openSUSE Leap with KDE Plasma / LibreOffice
Re: [Solved] New URLs and absolute/relative links
Yup, but unfortunately the regexp support in MySQL is limited to matching only rather than substitution, so you can't do this with a simple MySQL statement. You need to write a small batch script which does a select, mangle, update on the post table for all posts containing 'http://forum.openoffice.org/../forum/'. One for Imacat, sorry.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
- kingfisher
- Volunteer
- Posts: 2123
- Joined: Tue Nov 20, 2007 10:53 am
Re: [Solved] New URLs and absolute/relative links
I don't know why this has been marked as solved. I have reverted to the old url because the new one requires me to log in every time I use it.
Apache OpenOffice 4.1.9 on Linux
Re: [Solved] New URLs and absolute/relative links
Same for me.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Re: [Solved] New URLs and absolute/relative links
The thread was about introducing the "relative link tag", which is now working.kingfisher wrote:I don't know why this has been marked as solved. I have reverted to the old url because the new one requires me to log in every time I use it.
There are two types of people: those who believe that there are two types of people and those who do not.
openSUSE Leap with KDE Plasma / LibreOffice
openSUSE Leap with KDE Plasma / LibreOffice
- kingfisher
- Volunteer
- Posts: 2123
- Joined: Tue Nov 20, 2007 10:53 am
Re: [Solved] New URLs and absolute/relative links
OK. Thanks. I'll continue using the old urls. It's a real pest when I get an email containing a link using the new path.
Apache OpenOffice 4.1.9 on Linux