vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to make a minimum link to a single (separate) post without URL shortening? (https://vborg.vbsupport.ru/showthread.php?t=313179)

Igor.Gabrielan 07-23-2014 06:17 PM

How to make a minimum link to a single (separate) post without URL shortening?
 
For example, I insert to Twitter or Facebook a link to a separate post .

I want to get a link to a separate post number 13 in the thread
http://pr.ai/showthread.php?1728/page2

I click on #13 on the corresponding post (right, near the empty box).

I get in the browser URL
http://pr.ai/showthread.php?1728-Bax...ll=1#post20019

I'm cutting this URL to
http://pr.ai/showthread.php?1728&p=20019#post20019

Is it possible to further reduce URL?

What is striking is that twice repeated 20019.

Can you eliminate this redundancy?

Ideally, one could be left only the number of post 20019, as it is unique, and it is enough.

That is something like

http://pr.ai/p=20019

But it does not work.
Is it possible to achieve this ideal of brevity?

cellarius 07-24-2014 08:00 AM

Yes. You can just use http://pr.ai/showthread.php?p=12345.

Or, to make it even shorter, you could add a rewirte rule in your .htaccess:
Code:

RewriteRule p=([0-9]*)$ http://pr.ai/showthread.php?p=$1
for pr.ai/p=12345

Or
Code:

RewriteRule go([0-9]*)$ http://pr.ai/showthread.php?p=$1
for pr.ai/go12345

Igor.Gabrielan 07-24-2014 03:23 PM

Thank you! Got it!
I made a version with pr.ai/p=20019

--------------- Added [DATE]1406234933[/DATE] at [TIME]1406234933[/TIME] ---------------

I made now

pr.ai/post20019

Code:

RewriteRule post([0-9]*)$ http://pr.ai/showthread.php?p=$1
Why?

First, because it's easier to do short of a long link. Enough to cut one piece of text.

Secondly, so understandable and corresponds to the standard syntax for vBulletin's URL.

Thirdly, it is paradoxical, but I get such a short link that many either do not understand that this link, or not get the cursor on it. Number of transitions to link plummeted. Try to extend a little link.

Igor.Gabrielan 07-26-2014 06:54 AM

By analogy shortened link for threads

http://pr.ai/showthread.php?714-quot...2%2C+France%2C

-->

http://pr.ai/showthread.php?714

-->

http://pr.ai/thread714

Code:

RewriteRule thread([0-9]*)$ http://pr.ai/showthread.php?$1


All times are GMT. The time now is 08:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01165 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete