# Clean urls, without directory structures....not sure what it

**URL:** <https://www.ruby-forum.com/t/clean-urls-without-directory-structures-not-sure-what-it/110916>\
**Category:** Ruby\
**Created:** [August 1, 2007, 1:09am UTC](https://www.ruby-forum.com/t/clean-urls-without-directory-structures-not-sure-what-it/110916 "2007-08-01T01:09:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taelor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@taelor](https://www.ruby-forum.com/u/taelor)\
**Post date:** [August 1, 2007, 1:09am UTC](https://www.ruby-forum.com/t/clean-urls-without-directory-structures-not-sure-what-it/110916/1 "2007-08-01T01:09:56Z")

</div>

I have just recently learned the practice of clean uri/urls, combined  
with ruby’s string manipulation is a great way to pass open/  
insensitive data. right now i have just one page, that controls my  
whole site, except for index files that just pass the directory that  
its located in to the one page that controls the whole site based on  
the url address.

I find myself having to write scripts to make directories and copy the  
same index page over and over and over.

I think a more elegant solution would be to handle any uri/url without  
having the directory structure below.

Now I do know that maybe I’m posting in the wrong place and should be  
at the local web server forum, but it probably still has to do with  
some sort of apache/ruby based configuration? Maybe in the Add  
Handlers section?

I tried searching some things, but I couldn’t come up with the name of  
this design pattern, or which site I think used it.

Thanks for any help,  
taelor

---

<div class="post-metadata">

**Author:** ![taelor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@taelor](https://www.ruby-forum.com/u/taelor)\
**Post date:** [August 1, 2007, 3:09am UTC](https://www.ruby-forum.com/t/clean-urls-without-directory-structures-not-sure-what-it/110916/2 "2007-08-01T03:09:03Z")

</div>

On 8/1/07, taelor [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I think a more elegant solution would be to handle any uri/url without  
> having the directory structure below.

Take a look at your .htaccess file. You could easily set up some rewrite  
rules that redirect everything to a particular file. In your case, to  
your  
index page.
