Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
269 lines (190 sloc) 12.3 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" dir="ltr" lang="en-US">
<head profile="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>URLs ending in .html - SEO on Rails</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link rel="alternate" type="application/atom+xml" title="SEO on Rails feed" href=""/>
<!--[if IE 6]>
<style type="text/css">
.comment-form{margin-bottom: -3px}
<body id="top">
<div id="container">
<div id="wrapper">
<div id="header">
<div id="logo">
<!-- Your Logo image - max-width: 200px -->
<!-- USAGE:
1-create your own logo and save it as logo.jpg in the folder "images" in your theme folder.
2-uncomment code below:-->
<!-- <a class="logo" href="" title="Back Home"></a>
<h1><a href="">SEO on Rails</a></h1>
<!--<ul id="navAdmin">
<li><a href="">Log in</a></li>
<div class="menu"><ul><li class="current_page_item"><a href="" title="Home">Home</a></li><li class="page_item page-item-57"><a href="" title="Typography">Typography</a></li><li class="page_item page-item-2"><a href="" title="Usage">Usage</a></li><li class="page_item page-item-51"><a href="" title="License">License</a></li><li class="page_item page-item-61"><a href="" title="Contact">Contact</a></li></ul></div> -->
<!-- Alternative navigation
<ul class="menu">
<li class="current_page_item"><a href="">Home</a></li>
<li class="page_item page-item-57"><a href="" title="Typography">Typography</a></li>
<li class="page_item page-item-2"><a href="" title="Usage">Usage</a></li>
<li class="page_item page-item-51"><a href="" title="License">License</a></li>
<li class="page_item page-item-61"><a href="" title="Contact">Contact</a></li>
<li><a href="">External Link</a></li>
</ul> -->
<!-- FEED -->
<a id="rss" href="" title="Syndicate this site using RSS">SUBSCRIBE TO <b>RSS</b></a>
<div id="pageWrapper">
<div id="content">
<div class="postWrapper">
<div class="postmetadata">
<p class="meta-date">
<span class="date-day">24</span>
<span class="date-month">Jan</span>
<span class="date-year">2007</span>
<p class="meta-author">by Eaden McKee</p>
<!--<a href="link to comments" class="meta-comments" title=""></a>-->
<p class="meta-tags">
urls,routes </div>
<div class="post" id="post-3">
<h1><a href="" rel="bookmark" >URLs ending in .html</a></h1>
<div class="entry">
<p>This is just a personal preference of mine, but I like to have URLs end in .html. Fortunately rails makes this easy:</p>
<p>In your routes file:</p>
map.connect ':controller/:action/:id.html', :format =&gt; 'html'
<p>For your other custom routes you will need to also add :format =&gt; &#8216;html&#8217; and the .html at the end of the route line like above.</p>
<p>Another (better?) way to achieve nice URLs in rails, with .html suffixes is to add the following to your ApplicationController:<br />
def default_url_options(options)
{ :format =&gt; 'html' }
<p>This means your routing line is much cleaner. In fact it&#8217;s the default!</p>
map.connect ':controller/:action/:id.:format'
<!-- <div id="attachment_138" class="wp-caption aligncenter" style="width: 480px"><img src="" alt="Lorem ipsum dolor sit amet" title="nature-1" width="470" height="180" class="size-full wp-image-138" /><p class="wp-caption-text">Lorem ipsum dolor sit amet</p></div>
<h2>About this Theme</h2>
<p><a href="" title="Go back to the article"><strong>OneRoom</strong></a> is a free Wordpress theme designed by <a href="">Web-Kreation</a> whose blog you will find at <a href=""></a>. This theme is valid <a href=";charset=(detect+automatically)&#038;doctype=Inline&#038;group=0" target="_blank" rel="nofollow">(X)HTML</a> &#038; <a href=";profile=css21&#038;usermedium=all&#038;warning=1&#038;lang=es" target="_blank" rel="nofollow">CSS</a>.</p> -->
<div class="nav nav-border-bottom">
<div class="alignleft"><a href="/archives.html" >&laquo; Older Entries</a>&nbsp;</div>
<div class="alignright">&nbsp;</div>
</div> <!-- / content -->
<div id="sidebar">
<li class="nobackground">
<form method="get" id="searchform" action="">
<input class="search-field" type="text" onfocus="this.value=''" onblur="this.value='Search...'" value="Search..." name="s" id="s" />
<input class="search-submit" type="submit" value="" />
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it. -->
<li><h2>About SEO on Rails</h2>
<p>This website provides tips, tricks and code to help you to make your Ruby on Rails powered sites more search engine friendly and optimized.
If you have any Rails related SEO questions, feel free to drop me a line at questions @ this domain .com</p>
<!-- Banners / OPTIONAL -->
<!-- Banners' size must be 125x125 -->
<li class="ads clearfix"><h2>Our Sponsors</h2>
<!-- First Row -->
<a class="ad-left" href=""><img src="images/ad.jpg" alt="" /></a>
<a class="ad-right" href=""><img src="images/ad.jpg" alt="" /></a>
<li class="pagenav"><h2>Pages</h2><ul><li class="page_item page-item-57"><a href="" title="Typography">Typography</a></li>
<li class="page_item page-item-2"><a href="" title="Usage">Usage</a></li>
<li class="page_item page-item-51"><a href="" title="License">License</a></li>
<li class="page_item page-item-61"><a href="" title="Contact">Contact</a></li>
<!-- Optional - Latest Posts
<li><h2>Latest Posts</h2>
<li><a href='' title='OneRoom &#8211; Free WP Theme by Web-Kreation'>OneRoom &#8211; Free WP Theme by Web-Kreation</a></li>
<li><a href='' title='At vero eos et accusamus et iusto'>At vero eos et accusamus et iusto</a></li>
<li><a href='' title='Et quas molestias excepturi sint occaecati cupiditate'>Et quas molestias excepturi sint occaecati cupiditate</a></li>
<li><a href='' title='Et harum quidem rerum facilis est et expedita distinctio.'>Et harum quidem rerum facilis est et expedita distinctio.</a></li>
<li><a href='' title='Excepteur sint occaecat cupidatat non proident'>Excepteur sint occaecat cupidatat non proident</a></li>
<li><a href='' title='Ut enim ad minim veniam,'>Ut enim ad minim veniam,</a></li>
<li><a href='' title='February 2009'>February 2009</a></li>
<li><a href='' title='January 2009'>January 2009</a></li>
<li><a href='' title='December 2008'>December 2008</a></li>
<li><a href='' title='October 2008'>October 2008</a></li>
<li><a href='' title='September 2008'>September 2008</a></li>
<li class="categories"><h2>Categories</h2><ul> <li class="cat-item cat-item-25"><a href="" title="View all posts filed under Animals">Animals</a> (6)
<li class="cat-item cat-item-29"><a href="" title="View all posts filed under Insects">Insects</a> (2)
<li class="cat-item cat-item-26"><a href="" title="View all posts filed under Nature">Nature</a> (6)
<li class="cat-item cat-item-13"><a href="" title="View all posts filed under Travel">Travel</a> (1)
<li id="linkcat-2" class="linkcat"><h2>Reccomended</h2>
<ul class='xoxo blogroll'>
<li><a href="">The Rails Way</a></li>
<li><a href="">SEO Book</a></li>
<li><a href="">Railscasts</a></li>
<li><a href="">Hosted by Rubyserve</a></li>
<div class="clear"></div>
</div><!-- / pageWrapper -->
<div id="footer">
<div class="foot_l">&nbsp;</div>
<div class="foot_content">
<div class=""></div>
All contents copyright &copy;Seo on Rails. All rights reserved. |
<!-- License: -->
<!-- If you want to remove this copyright notice, please contact me at info {at} web-kreation {dot} com -->
Theme design by <a href="">Web-Kreation</a>.
<!-- / END -->
<div class="foot_r">&nbsp;</div>
<a href="#top" id="toTop">&nbsp;</a>
</div><!-- / footer -->
</div><!-- / Wrapper -->
<!-- Stunning design by Jeeremie - -->
</div><!-- / container -->
<script src="" type="text/javascript">
<script type="text/javascript">
_uacct = "UA-32073-10";
<script type='text/javascript' src=''></script>
Jump to Line
Something went wrong with that request. Please try again.