For example, following url's should redirect to this topic/post.
ahkscript.org/t93512
ahkscript.org/p414331
Can something like this be done?.
I want to stop using external providers.
Feature request : Short URL redirection
Re: Feature request : Short URL redirection
Simple enough! I only implemented "p" which takes the "t=#####" numbers.
http://ahkscript.org/?p=93512
http://ahkscript.org/?p=93512
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Feature request : Short URL redirection
Thank you very much @joedfjoedf wrote: ↑08 Aug 2021, 12:05Simple enough! I only implemented "p" which takes the "t=#####" numbers.
http://ahkscript.org/?p=93512
t= isn't possible? In case you want to support direct post link in future?
For example, user @teadrinker (almost) always post scripts as solutions in ask-for-help.
A direct link to a post is too long like:
https://www.autohotkey.com/boards/viewtopic.php?p=414331#p414331
Just suggesting.
Thanks again.
Re: Feature request : Short URL redirection
Oops, my bad! For some reason I though was t for direct posts... I have implement all three , so this:
http://ahkscript.org/?f=3&t=93512&p=414348
is equivalent to this:
https://www.autohotkey.com/boards/viewtopic.php?f=3&t=93512&p=414348#p414348
so it should be sufficient to just do this for specific posts:
http://ahkscript.org/?p=414348
For reference, php code:
http://ahkscript.org/?f=3&t=93512&p=414348
is equivalent to this:
https://www.autohotkey.com/boards/viewtopic.php?f=3&t=93512&p=414348#p414348
so it should be sufficient to just do this for specific posts:
http://ahkscript.org/?p=414348
For reference, php code:
Spoiler
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Feature request : Short URL redirection
Awesome. Thank you.
Re: Feature request : Short URL redirection
I first get a browser warning (because not https) and then it loads forever without resolving to the forum URL.
Re: Feature request : Short URL redirection
Server worked was being done yesterday. I don't know what specifically, but mainly the ahkscript.org domain is not working as before.
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Feature request : Short URL redirection
As far as I can tell we still own the domain, but I dont have access to it so I am not sure...
Anyway, I suspect this is only temporary. In the mean time, i've added this feature on the autohotkey.com domain
https://autohotkey.com/r?p=414348
Anyway, I suspect this is only temporary. In the mean time, i've added this feature on the autohotkey.com domain
https://autohotkey.com/r?p=414348
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Feature request : Short URL redirection
That statement is confusing. Can? or Can't?.
Yay!
Re: Feature request : Short URL redirection
Whoops.. "can"... edited my post thanks
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Feature request : Short URL redirection
Working now
Code: Select all
; v1.1
;Long URL format https://www.autohotkey.com/boards/viewtopic.php?p=414597#p414597
;Short URL format https://www.autohotkey.com/r?p=414597
AhkForumUrlShorten(URL) {
if RegExMatch(URL, "^https\:\/\/www.autohotkey\.com\/boards\/viewtopic\.php\?.*(p=\d+).*$", Match)
return Match1 ? "https://www.autohotkey.com/r?" Match1 : ""
}
Code: Select all
; v2.0-beta.1
;Long URL format https://www.autohotkey.com/boards/viewtopic.php?p=414597#p414597
;Short URL format https://www.autohotkey.com/r?p=414597
AhkForumUrlShorten(URL) {
if RegExMatch(URL, "^https\:\/\/www.autohotkey\.com\/boards\/viewtopic\.php\?.*(p=\d+).*$", &Match)
return Match[1] ? "https://www.autohotkey.com/r?" Match[1] : ""
}
Re: Feature request : Short URL redirection
neat haha
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Feature request : Short URL redirection
Broken again.
Re: Feature request : Short URL redirection
it seems that the default index.php, index.html, index.htm has been changed...
Additionally, it seems that @mentions are gone too...
Additionally, it seems that @mentions are gone too...
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Feature request : Short URL redirection
@SKAN Should be fixed now!
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Feature request : Short URL redirection
Thanks @joedf
Who is online
Users browsing this forum: No registered users and 32 guests