It is about technology!
 Subscribe to Feed

More about .html extension to WordPress pages

htmlI discussed about adding a “.html” suffix to the permalinks of pages also through a plugin in the previous post. I wish to point out that mere addition of .html ending doesn’t enhance search engine ranking since WordPress uses canonical URLs by default. Hence no special SEO joy!

Another interesting fact worth remembering is that visitors looking at the posts and pages with .html suffix may get a feeling that they are static .html pages. But they are not! They are still generated dynamically. The cosmetic suffix is only a facade (sexing up, sort of!) made possible by the mod_rewrite module of the web server.

Here is an unintended twist to the facility of adding .html ending to the pages. supposing you use a static front page for your site and a page name of “Blog” to display the list of posts. Then http://yousite.com/ will show your static front page and http://yoursite.com/blog/ will list your blog posts. Fine. But if you use the “.html” ending for pages plugin, the blog page will have an URL as “http://yoursite.com/blog.html”. This is also fine. Now you have more posts necessitating pagination of entries and you navigate to the next page of posts showing another set of older entries. The URL will become “http://yoursite.com/blog.html/page/2”. This is not fine! Agree?

So think about this weird URL before rushing to add the vaunted .html to pages!

Tags: , , , , , , ,

Nifty permalinks

The default URI of a blog post in WordPress ends like this “/?p=#” which is neither aesthetic nor liked by the search engine bots. So WordPress gives you an option, rather a bunch of options to sex up the URI to look like any web page either in the virtual folder format showing the name of the post/page with a trailing slash, or with any kind of suffix of your choice viz: .html, .php etc. This function is achieved by employing the “mod-rewrite” module (URL rewriting engine) of Apache web server. You can find details about this functionality at this Codex page. if you have any difficulty in following the instructions given on that page, please post a comment. I will try to elucidate further.

In this web site, I have chosen .html suffix for the blog posts. But that doesn’t work with “Pages”. But there is help around for extending this mod to pages also. Introsites has developed a plugin which does the job neatly. With that plugin in action, when you choose .html suffix as permalink, it applies to both posts and pages.

You can get the plugin from this web page.

Tags: , , , ,

Copyright © HyperCircle 2009 | Powered by Wordpress | Designed by Elegant Themes