# Subdomain\_fu rewriting wrong with tld size 2?

**URL:** <https://www.ruby-forum.com/t/subdomain-fu-rewriting-wrong-with-tld-size-2/159469>\
**Category:** Rails\
**Created:** [February 4, 2009, 8:46pm UTC](https://www.ruby-forum.com/t/subdomain-fu-rewriting-wrong-with-tld-size-2/159469 "2009-02-04T20:46:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lodestone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e495f1/32.png) [@lodestone](https://www.ruby-forum.com/u/lodestone)\
**Post date:** [February 4, 2009, 8:46pm UTC](https://www.ruby-forum.com/t/subdomain-fu-rewriting-wrong-with-tld-size-2/159469/1 "2009-02-04T20:46:24Z")

</div>

I have a website on a demo server at:  
[mycompany.com](http://mycompany.com)

I have a Rails app with subdomain\_fu. I’ve verified it’s running in the  
right environment and set the TLD Size to “2” so I can have:  
[myapp.mycompany.com](http://myapp.mycompany.com)  
[admin.myapp.mycompany.com](http://admin.myapp.mycompany.com)  
\*.myapp.mycompany.com (for users’ customized landing pages)

This works great on my local computer with “myapp.local” and  
“admin.myapp.local”

but on my dev server, I’m getting URLs like

[http://myapp.mycompany.com/myapp](http://myapp.mycompany.com/myapp)  
[http://admin.myapp.mycompany.com/myapp](http://admin.myapp.mycompany.com/myapp)

and it’s prepending ‘/myapp/’ to all stylesheet and javascript includes,  
causing them to fail

I’ve googled everywhere on this. Any ideas?
