PDA

View Full Version : How to make a minimum link to a single (separate) post without URL shortening?


Igor.Gabrielan
07-23-2014, 06:17 PM
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-Baxter-industrial-and-research-robot-Rethink-Robotics-Boston-Massachusetts-USA&p=20019&viewfull=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:
RewriteRule p=([0-9]*)$ http://pr.ai/showthread.php?p=$1
for pr.ai/p=12345

Or
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 (http://pr.ai/p=20019)

--------------- Added 1406234933 at 1406234933 ---------------

I made now

pr.ai/post20019 (http://pr.ai/post20019)

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-Kara-quot-David-Cage-Quantic-Dream-2012-France-USA&highlight=Kara+David+Cage%2C+Quantic+Dream%2C+2012 %2C+France%2C

-->

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

-->

http://pr.ai/thread714

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