# .htaccess ReWrite

**URL:** <https://www.ruby-forum.com/t/htaccess-rewrite/156793>\
**Category:** Rails\
**Created:** [January 3, 2009, 12:01am UTC](https://www.ruby-forum.com/t/htaccess-rewrite/156793 "2009-01-03T00:01:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_McGilvray](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8c91f0/32.png) [@Sean\_McGilvray](https://www.ruby-forum.com/u/Sean_McGilvray)\
**Post date:** [January 3, 2009, 12:01am UTC](https://www.ruby-forum.com/t/htaccess-rewrite/156793/1 "2009-01-03T00:01:04Z")

</div>

Hello everyone,  
I have the following old way of getting users to their sites

> **[Website Domain Names, Online Stores & Hosting](https://www.domain.com/?username)**
>
> Finding the perfect website domain is as easy as 1-2-3. Buy a domain name, build and host a website, and enjoy our professional online marketing tools.

I want all request coming in to this old way to go to the new way

[www.domain.com/profile/username](http://www.domain.com/profile/username)

Domain name is the same.

Is there a way to do this within Rails Routes or does someone know how  
to write this in .htaccess?

Thank you,

Sean McGilvray
