# Redeveloped static site as rails site but where have my .html gone

**URL:** <https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997>\
**Category:** Rails\
**Created:** [September 5, 2009, 1:53pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997 "2009-09-05T13:53:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpflaum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d2c977/32.png) [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Post date:** [September 5, 2009, 1:53pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997/1 "2009-09-05T13:53:32Z")

</div>

I’ve replaced a well established static site, [http://pollenceramics.com](http://pollenceramics.com)  
with a rails based site. Rails seems rather ideal for adding various  
dynamic facilities like a shopping carts etc. During development, I  
ignored that rails does not use .html extensions. As the site has been  
around for some time and contains lots of nice images which has caused  
other sites including Google to point to it. Its page rank on Google  
is quite good because over time it has what Google calls ‘inbound  
links’. These are links on other sites that point to this site.

Except for inbound links that point at [http://pollenceramics.com](http://pollenceramics.com) these  
inbound links have all been broken. The question is how do I put  
the .html back on the sub-pages?

For instance, the old site had a page [pollenceramics.com/artist.html](http://pollenceramics.com/artist.html).  
The rails version is now [pollenceramics.com/artist](http://pollenceramics.com/artist) which is a  
completely loss to links that point at [pollenceramics.com/](http://pollenceramics.com/)  
artist.html.

I hope I’ve been clear in explaining the problem. A session of RTFM  
has left me in a state of total confusion. Help would be appreciated.

---

<div class="post-metadata">

**Author:** ![rpflaum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d2c977/32.png) [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Post date:** [September 5, 2009, 3:52pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997/2 "2009-09-05T15:52:15Z")

</div>

Rick Pflaum wrote:

> I’ve replaced a well established static site, [http://pollenceramics.com](http://pollenceramics.com)  
> with a rails based site. Rails seems rather ideal for adding various  
> dynamic facilities like a shopping carts etc. During development, I  
> ignored that rails does not use .html extensions. As the site has been  
> around for some time and contains lots of nice images which has caused  
> other sites including Google to point to it. Its page rank on Google  
> is quite good because over time it has what Google calls ‘inbound  
> links’. These are links on other sites that point to this site.
> 
> Except for inbound links that point at [http://pollenceramics.com](http://pollenceramics.com) these  
> inbound links have all been broken. The question is how do I put  
> the .html back on the sub-pages?

You can do this with Rails routing or mod\_rewrite (or a non-Apache  
equivalent).

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![rpflaum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d2c977/32.png) [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Post date:** [September 5, 2009, 8:57pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997/3 "2009-09-05T20:57:26Z")

</div>

If you want to move to the ‘canonical’ versions of the pages, put in  
permanent redirects (301) from the .html to the non-html versions.  
Could do that in a variety of ways, depending on what your server config  
is. Eventually you can get rid of the redirects, once they’re out  
of the search engines’ indices.

dwh

---

<div class="post-metadata">

**Author:** ![rpflaum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d2c977/32.png) [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Post date:** [September 5, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997/4 "2009-09-05T17:05:34Z")

</div>

On Sat, Sep 5, 2009 at 1:32 AM, Confused about  
Rails[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Except for inbound links that point at [http://pollenceramics.com](http://pollenceramics.com) these  
> inbound links have all been broken. The question is how do I put  
> the .html back on the sub-pages?

Getting rid of the page suffixes is a good thing, particularly from the  
point of view of using Rails for new features. As a quick fix for your  
inbound-link 404 issues I would front-end the site with Apache httpd  
and use mod\_rewrite to strip the .html off all requests.

## FWIW,

Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![rpflaum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d2c977/32.png) [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Post date:** [September 6, 2009, 11:43pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997/5 "2009-09-06T23:43:42Z")

</div>

I’m not an SEO expert, but I am about 99% sure if you switch from the  
.html to non-.html URLs, you are going to want to have permanent  
redirects in place or your ranking is going to take a hit for a while  
(not to mention users who have bookmarks, other sites with links to you,  
etc).

dwh

---

<div class="post-metadata">

**Author:** ![rpflaum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d2c977/32.png) [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Post date:** [September 6, 2009, 6:46pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997/6 "2009-09-06T18:46:54Z")

</div>

Appreciate the mod\_rewrite suggestions. That will clearly solve the  
problem of the broken inbound links.

However, I need to do some more research on what Google counts as an  
inbound link. The Google page ranking may just want to see what its  
always seen i.e. /.html or the ranking software  
may be clever enough to figure out that [pollenceramics.com/artist](http://pollenceramics.com/artist)  
still works and is accepted as an inbound link.

I certainly take the point that its much better to follow the rails  
convention of / and forget the .html.

---

<div class="post-metadata">

**Author:** ![rpflaum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d2c977/32.png) [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Post date:** [September 11, 2009, 9:21pm UTC](https://www.ruby-forum.com/t/redeveloped-static-site-as-rails-site-but-where-have-my-html-gone/174997/7 "2009-09-11T21:21:45Z")

</div>

On Sep 6, 10:41 pm, Denis H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m not an SEO expert, but I am about 99% sure if you switch from the  
> .html to non-.html URLs, you are going to want to have permanent  
> redirects in place or your ranking is going to take a hit for a while  
> (not to mention users who have bookmarks, other sites with links to you,  
> etc).

Agreed. The issue is how to implement those redirects. mod\_rewrite  
seems to have two problems. The documentation basically says that this  
stuff is really complicated, don’t expect to understand it in a day  
but more to the point the Passenger documentation says don’t use  
mod\_rewrite and mod\_rails (passenger’s implementation) together or  
everything falls appart.

Basically, what I need it to take for instance …

[pollenceramics.com/artist.html](http://pollenceramics.com/artist.html) and point the inbound client to  
[pollenceramics.com/artist](http://pollenceramics.com/artist).

I’d expect that a routing expert would be able to do that. I’m  
definitely not that expert. I’m trying to make what strikes me as some  
other simple routing changed and they have sent me running to the  
documentation in tears.
