LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 08-27-2007, 01:26 AM   #1
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Rep: Reputation: 30
how to short url(link)


hi all

how to short the url....
it is general query..

for example:
www.google.com
have to short in the form of
munna

is there any possible way

please help me

thank you in advance
 
Old 08-27-2007, 04:07 AM   #2
reverse
Member
 
Registered: Apr 2007
Distribution: Gentoo
Posts: 337

Rep: Reputation: 30
Not sure what you mean.. perhaps /etc/hosts can help?
 
Old 08-27-2007, 04:14 AM   #3
rjwilmsi
Member
 
Registered: Mar 2005
Location: UK
Distribution: opensuse 12.2 x86_64
Posts: 563

Rep: Reputation: 38
You can do this in Firefox by bookmarking www.google.com and adding the Keyword munna to the properties of the bookmark. Then if you type munna and hit enter in the URL bar, you will go to google.
 
Old 08-27-2007, 04:19 AM   #4
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by rjwilmsi View Post
You can do this in Firefox by bookmarking www.google.com and adding the Keyword munna to the properties of the bookmark. Then if you type munna and hit enter in the URL bar, you will go to google.
yeah just like this...
actually this i would like to use in orkut to avoid refer code...

i searched for this in google...
there is an website called notlong.com
there if we give munna instead of www.google.com

it may generate short link like
http://munna.notlong.com

but i dont need this..
i just wanna munna instead of http://munna.notlong.com

please help me

thank you inadvamce
 
Old 08-27-2007, 07:49 AM   #5
floppywhopper
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Mageia , Centos
Posts: 643
Blog Entries: 2

Rep: Reputation: 136Reputation: 136
I think you are asking about
BB Code

where you can take the url
http://en.wikipedia.org/wiki/BBCode
and make it like the link I posted above

so you can go here
or here
http://www.bbcode.org/

and learn about how to shorten your urls
http://www.bbcode.org/tags.php#9

regards
floppywhopper
 
Old 08-27-2007, 03:11 PM   #6
<?Script
LQ Newbie
 
Registered: Aug 2007
Location: Amsterdam
Distribution: Ubuntu(learning)
Posts: 6

Rep: Reputation: 0
Hmm the question is abit incomplete in my opinion, do you want to use it on youre website like that? on a forum? on a normal forum BBcode parsers would be installed and you could use the tags, for youre own site to make it work like that you would have to write a parser youreself (or download one ofc.)
if you write it yourself this is the code i used for making url's:
Code:
//removes the HTTP:// if its typed, so that url's wont be http://http://url.com
$text = preg_replace('#\[url=http://#isU', '[url=', $text);
$text = preg_replace('#\[url\]http://#isU', '[url]', $text);
//makes text between  and  a link to the url
$text = preg_replace('#\[url=(.+)\](.+)\[/url\]#isU', '<a href="http://$1" target="blank">$2</a>', $text);
//makes a url of the text between  and  to the text between them.
$text = preg_replace('#\[url\](.+)\[/url\]#isU', '<a href="http://$1" target="blank">$1</a>', $text);
//makes the text between [google] and [/google] a search link to google for the topic inside the text
$text = preg_replace('#\[google\](.+)\[/google\]#isU', '<a href="http://www.google.com/search?hl=en&q=$1&btnG=Google+zoeken&meta=" target="blank">Google: $1</a>', $text);
//makes a mailto for the adress between  and  tags
$text = preg_replace('#\[email\](.+)\[/email\]#isU', '<a href="mailto:$1">$1</a>', $text);
//makes the text between  and  a mailto link to *
$text = preg_replace('#\[email=(.+)\](.+)\[/email\]#isU', '<a href="mailto:$1">$2</a>', $text);
 
Old 08-27-2007, 11:15 PM   #7
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by <?Script View Post
Hmm the question is abit incomplete in my opinion, do you want to use it on youre website like that? on a forum? on a normal forum BBcode parsers would be installed and you could use the tags, for youre own site to make it work like that you would have to write a parser youreself (or download one ofc.)
if you write it yourself this is the code i used for making url's:
Code:
//removes the HTTP:// if its typed, so that url's wont be http://http://url.com
$text = preg_replace('#\[url=http://#isU', '[url=', $text);
$text = preg_replace('#\[url\]http://#isU', '[url]', $text);
//makes text between  and  a link to the url
$text = preg_replace('#\[url=(.+)\](.+)\[/url\]#isU', '<a href="http://$1" target="blank">$2</a>', $text);
//makes a url of the text between  and  to the text between them.
$text = preg_replace('#\[url\](.+)\[/url\]#isU', '<a href="http://$1" target="blank">$1</a>', $text);
//makes the text between [google] and [/google] a search link to google for the topic inside the text
$text = preg_replace('#\[google\](.+)\[/google\]#isU', '<a href="http://www.google.com/search?hl=en&q=$1&btnG=Google+zoeken&meta=" target="blank">Google: $1</a>', $text);
//makes a mailto for the adress between  and  tags
$text = preg_replace('#\[email\](.+)\[/email\]#isU', '<a href="mailto:$1">$1</a>', $text);
//makes the text between  and  a mailto link to *
$text = preg_replace('#\[email=(.+)\](.+)\[/email\]#isU', '<a href="mailto:$1">$2</a>', $text);

am creating a redirecting link....
with out http:// and .com
and this link is not using for forum...
it is a general querry

can you help me

thank you in advance
 
Old 08-28-2007, 12:11 AM   #8
<?Script
LQ Newbie
 
Registered: Aug 2007
Location: Amsterdam
Distribution: Ubuntu(learning)
Posts: 6

Rep: Reputation: 0
if its on a place where you can use HTML:
Code:
<a href='url'>text to click on</a>
 
Old 08-30-2007, 07:28 PM   #9
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
try www.tinyurl.com if you actually want to make a link shorter to post to a website if thats what you mean

eg

http://www.linuxquestions.org/questi...d.php?t=580073
(this thread)
becomes
http://tinyurl.com/3dtw5s
 
Old 08-31-2007, 03:31 AM   #10
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by dasy2k1 View Post
try www.tinyurl.com if you actually want to make a link shorter to post to a website if thats what you mean

eg

http://www.linuxquestions.org/questi...d.php?t=580073
(this thread)
becomes
http://tinyurl.com/3dtw5s
hi
tried this.
but it contains http:// and .com
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Link to URL raylhm Linux - Desktop 2 10-24-2006 09:37 PM
ERROR The requested URL could not be retrieved While trying to retrieve the URL: /re Niceman2005 Linux - General 1 06-29-2005 09:51 AM
How do I link a file to a URL site. AZDAVE Linux - Networking 2 10-14-2004 06:30 PM
URL Link association berkough Red Hat 1 07-19-2004 11:37 PM
launching firefox from a url/email link problems nandish Linux - Newbie 1 06-05-2004 08:36 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration