WordPress.org

Ready to get started?Download WordPress

Forums

Tweet This
[resolved] WP Local URL shortner with no www (8 posts)

  1. wprunner
    Member
    Posted 3 years ago #

    Hello,

    There is a very nice option in this plugin that allows the use of the local domain as the URL shortner. But why keep the www ? If a blog is using the www, it already has canonicalization that redirects the the non www to the www URL.

    It means that instead of generating a URL like this:

    http://www.mydomain.com/?p=123

    the plugin should generate a URL like this:
    http://mydomain.com/?p=123

    This will save 4 characters.

    Please add option for this or make it automatic.

    Thanks.

    http://wordpress.org/extend/plugins/tweet-this/

  2. richardxthripp
    Member
    Plugin Author

    Posted 3 years ago #

    I will make a note of this, but the next version of Tweet This is probably 2 weeks off. If you want to save four characters, why use the www subdomain at all? WordPress does not use it by default and major websites like twitter.com and wordpress.com have also rejected the www precedent. It may have been necessary for consumer adoption in 2000, but not in 2010.

  3. wprunner
    Member
    Posted 3 years ago #

    I use the www because I think it is visually better to see the domain name, so I believe that's better for the visitors.

    But anyway, since I use it, I should not revert to "no www". The same case for when you don't use it, you should not add the www.

    The only reason that I want to save the 4 characters is for twitter tweets. If it wasn't that, I would of used the complete permalink.

    Also, I don't want to use URL shortening services, because I simply want to use my domain name and give my domain a better exposure.

  4. richardxthripp
    Member
    Plugin Author

    Posted 3 years ago #

    Try replacing all instances of get_bloginfo('url') with str_replace('www.', '', get_bloginfo('url')) in tweet-this.php. There are 9 of them. I will add an option for this in the next version.

  5. richardxthripp
    Member
    Plugin Author

    Posted 3 years ago #

    Also, make sure to flush the Tweet This URL cache after making the above changes. That's something else I need to fix—Tweet This should not cache local URLs to the wp_postmeta table—only external short URLs.

  6. wprunner
    Member
    Posted 3 years ago #

    Thanks for you support on your forum and the other plugin forum.

  7. richardxthripp
    Member
    Plugin Author

    Posted 3 years ago #

    Hey, you're welcome.

  8. richardxthripp
    Member
    Plugin Author

    Posted 3 years ago #

    I have decided not to make this a user option. Tweet This 1.8.1 removes www. automatically from local URLs. Hopefully, everyone who uses www has the non-www versions forwarding by HTTP 301.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags