Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-23-2014, 06:17 PM
Igor.Gabrielan Igor.Gabrielan is offline
 
Join Date: Jan 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 07-24-2014, 08:00 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
2 благодарности(ей) от:
Igor.Gabrielan, tbworld
  #3  
Old 07-24-2014, 03:23 PM
Igor.Gabrielan Igor.Gabrielan is offline
 
Join Date: Jan 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 07-26-2014, 06:54 AM
Igor.Gabrielan Igor.Gabrielan is offline
 
Join Date: Jan 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04151 seconds
  • Memory Usage 2,196KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (2)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete