short-url

Short URL or long URL for SEO

好久不见. 提交于 2019-12-04 09:10:38
I am implementing cs-cart for a web site. Which one is better for SEO if possible with a reason or reference. Site sells books stamps cds etc. www.domain.com/book/Java.html (or) www.domain.com/book/programming/Java.html or www.domain.com/Java.html Some says short URLs are good. But isnt it good that stating which category the product it is in. Thanks You can go for both, via canonical URL s. For example, in the <head> of both /Java.html and /book/Java.html: <link rel="canonical" href="/book/programming/Java.html" /> With that, Googlebot (and Yahoo/MS' spiders) will see the current page as a

file_get_contents() for short urls

☆樱花仙子☆ 提交于 2019-11-30 20:24:06
file_get_contents() doesn't read data for short urls Example: http://wp.me/pbZy8-1WM, http://bit.ly/d00E2C Please help me in handle this. OR Is there any CURL function to handle above links? This in general works fine. If you find it doesn't do the right thing you can explicitly use a stream context: $url = "http://bit.ly/d00E2C"; $context = stream_context_create(array('http' => array('max_redirects' => 5))); $val = file_get_contents($url, false, $context); should do it. No need to touch CURL for that. On my machine, I cannot replicate your problem; I receive the page as intended. However,

Change URL Address make short in PHP

若如初见. 提交于 2019-11-29 07:29:53
I have Url as: localhost/ab/directory.php?id=200 id=200 is jenny id member how to change it to localhost/ab/jenny is possible? Thanks You'll want to use mod_rewrite, a module available in apache. This will be managed by an .htaccess file within your web directory. AddedBytes has a nice tutorial for beginners on url-rewriting. See: http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/ bala3569 See: http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/ You can do this in at least 2 different ways: Use mod_rewrite for Apache to map the SEO friendly URL to your

Making a short URL similar to TinyURL.com

狂风中的少年 提交于 2019-11-28 19:44:52
I'm building a new web app that has a requirement to generate an internal short URL to be used in the future for users to easily get back to a specific page which has a very long URL. My initial thoughts are to store a number in a database and output it in a HEXADECIMAL value to keep it shorter than an integer. TinyURL.com seems to use something other than HEXADECIMAL (multiple case letters mixed with numbers). Is there an easy way to generate something similar what TinyURL does? Rubens Farias Please, check out this good explanation on subject: Random TinyURL Browser (Updated) . Important part

How to make unique short URL with Python?

隐身守侯 提交于 2019-11-28 03:12:20
How can I make unique URL in Python a la http://imgur.com/gM19g or http://tumblr.com/xzh3bi25y When using uuid from python I get a very large one. I want something shorter for URLs. FogleBird Edit : Here, I wrote a module for you. Use it. http://code.activestate.com/recipes/576918/ Counting up from 1 will guarantee short, unique URLS. /1, /2, /3 ... etc. Adding uppercase and lowercase letters to your alphabet will give URLs like those in your question. And you're just counting in base-62 instead of base-10. Now the only problem is that the URLs come consecutively. To fix that, read my answer

Change URL Address make short in PHP

一笑奈何 提交于 2019-11-28 01:11:18
问题 I have Url as: localhost/ab/directory.php?id=200 id=200 is jenny id member how to change it to localhost/ab/jenny is possible? Thanks 回答1: You'll want to use mod_rewrite, a module available in apache. This will be managed by an .htaccess file within your web directory. AddedBytes has a nice tutorial for beginners on url-rewriting. See: http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/ 回答2: See: http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/ 回答3: You

PHP random URL names (short URL)

我们两清 提交于 2019-11-27 18:53:22
After using sites like JSFiddle I noticed that they auto generate a random and unique URL made up of various upper and lower case characters. We could benefit from this for our booking pages. How is it done? RobertPitt This is not random, there based of the ID of your database record. How it works: basically you have a string that is unique but it can be decrypted to represent a number, you should look at it as a short encryption / decryption. You have a function that would take an unique ID and then it creates a Unique 'short string' from that id, and then you can reverse the process to get

What's the best way to create a short hash, similar to what tiny Url does?

做~自己de王妃 提交于 2019-11-27 17:17:49
I'm currently using MD5 hashes but I would like to find something that will create a shorter hash that uses just [a-z][A-Z][0-9]. It only needs to be around 5-10 characters long. Is there something out there that already does this? Update: I like the CRC32 hash. Is there a clean way of calculating it in .NET? Update2: I'm using the CRC32 function from the link Joe provided. How can I convert the uInt into the characters defined above? .NET string object has a GetHashCode() function. It returns an integer. Convert it into a hex and then to an 8 characters long string. Like so: string hashCode =

Making a short URL similar to TinyURL.com

旧街凉风 提交于 2019-11-27 12:29:50
问题 I'm building a new web app that has a requirement to generate an internal short URL to be used in the future for users to easily get back to a specific page which has a very long URL. My initial thoughts are to store a number in a database and output it in a HEXADECIMAL value to keep it shorter than an integer. TinyURL.com seems to use something other than HEXADECIMAL (multiple case letters mixed with numbers). Is there an easy way to generate something similar what TinyURL does? 回答1: Please,

How do short URLs services work?

跟風遠走 提交于 2019-11-27 10:01:53
How do services like TinyURL or Metamark work? Do they simply associate the tiny URL key with a [virtual?] web page which merely provide an "HTTP redirect" to the original URL? or is there more "magic" to it ? [original wording] I often use URL shortening services like TinyURL, Metamark, and others, but every time I do, I wonder how these services work. Do they create a new file that will redirect to another page or do they use subdomains? Abel No, they don't use files. When you click on a link like that, an HTTP request is send to their server with the full URL, like http://bit.ly/duSk8wK