# Re: redirecting url

**URL:** <https://www.ruby-forum.com/t/re-redirecting-url/135144>\
**Category:** Ruby\
**Created:** [April 18, 2008, 12:12pm UTC](https://www.ruby-forum.com/t/re-redirecting-url/135144 "2008-04-18T12:12:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![skade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@skade](https://www.ruby-forum.com/u/skade)\
**Post date:** [April 18, 2008, 12:12pm UTC](https://www.ruby-forum.com/t/re-redirecting-url/135144/1 "2008-04-18T12:12:50Z")

</div>

|-----BEGIN PGP SIGNED MESSAGE-----  
|Hash: SHA1  
|  
|Vio D. wrote:  
|| Hi,  
||  
|| I’m trying to redirect my redmine page :  
||  
|| I have my web site url : [http://www.mywebsite.eu](http://www.mywebsite.eu)  
|| and I try to put redmine on [http://www.mywebsite.eu/redmine](http://www.mywebsite.eu/redmine)  
||  
|| but I can’t !  
||  
|| I put in ‘http\_vhosts.conf’ a redirection proxy  
||  
|| proxypass /redmine [http://localhost:3000/redmine](http://localhost:3000/redmine)  
|| proxypassreverse /redmine [http://localhost:3000/redmine](http://localhost:3000/redmine)  
||  
|| So now my first page works properly put when I go to another page : 404  
|| Error Page not found.  
||  
|| Can you please tell what I did wrong or what I should add ?  
|  
|Check the manual and other support sites for your webserver.  
|  
|- –  
|Phillip G.  
|Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)

If RTFM is the only thing that you have to say: keep it to yourself.  
Manual and support won’t help him here, because he is obviously on a  
wrong track.

So, Vio. We had a similar problem a while ago.

The problem is that you application is mapped at “/” on your local  
webserver (localhost:3000). So, the proxypass has to read:

# ====== proxypass /redmine [http://localhost:3000](http://localhost:3000) proxypassreverse /redmine [http://localhost:3000](http://localhost:3000)

This however gives you another problem: redmine will begin to generate  
URLs that are mapped to “/”. So links won’t work. You have to tell  
redmine what it’s relative url root is:

# ====== ActionController::AbstractRequest.relative\_url\_root = “/redmine”

Put this in one of the environment files after the frameworks are  
loaded.

Greetings  
Skade

---

<div class="post-metadata">

**Author:** ![skade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@skade](https://www.ruby-forum.com/u/skade)\
**Post date:** [April 18, 2008, 12:32pm UTC](https://www.ruby-forum.com/t/re-redirecting-url/135144/2 "2008-04-18T12:32:21Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

removed\_email\_address@domain.invalid wrote:

| If RTFM is the only thing that you have to say: keep it to yourself.  
Manual and support won’t help him here, because he is obviously on a  
wrong track.

This is the Ruby T. mailing list, not a mailing list for redmine  
([http://www.redmine.org/](http://www.redmine.org/)), nor the Rails mailing list  
([http://www.ruby-forum.com/forum/3](http://www.ruby-forum.com/forum/3)). Asking for configuration details of  
an unspecified webserver (Mongrel cluster? Litespeed? mod\_rails?  
WEBrick?) is better done at the locations that are actually concerned  
with that.

The chances of finding somebody who can actually help increases  
extremely.

Especially if the crystal ball is cloudy.

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)

Youth is the trustee of posterity.  
~ – Benjamin Disraeli  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkgIeIoACgkQbtAgaoJTgL9IFwCbBND5AVGoM8UPqtgYeYyGGeFl  
kVgAn0Dh4mwWU2VT2MwBszWqfBXh0Hsz  
=gM8y  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![skade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@skade](https://www.ruby-forum.com/u/skade)\
**Post date:** [April 18, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/re-redirecting-url/135144/3 "2008-04-18T13:45:11Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

> extremely.
> 
> Especially if the crystal ball is cloudy.
> 
> * * *
> 
> Phillip G.  
> Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)

While this is true, your answer would have been more useful if you  
actually  
provided those references you are providing now. Just answering “well,  
read the  
manual” without pointing out the flaws of his request is not helpful  
and futile.  
Your answer only increases Vios frustration which cannot be the goal  
of this  
mailing list.

Regards,  
Florian G.

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkgIpZQACgkQJA/zY0IIRZb5fgCfYWHr80tAmaNUEWZ1ADZp61D3  
oMcAoL54X2JHgvVc2ZLTduUc6aDX8oTm  
=pUT0  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![skade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@skade](https://www.ruby-forum.com/u/skade)\
**Post date:** [April 18, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/re-redirecting-url/135144/4 "2008-04-18T14:31:00Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Florian G. wrote:

| While this is true, your answer would have been more useful if you  
actually  
| provided those references you are providing now. Just answering “well,  
| read the  
| manual” without pointing out the flaws of his request is not helpful and  
| futile.  
| Your answer only increases Vios frustration which cannot be the goal of  
| this  
| mailing list.

What’s next: “How to use a search engine”? “Clicking on links for the  
search-engine impaired”? “Can u giv me teh codez for h3ll0 wurld!1111”?

A minimal level of research can be, and should be, expected. And somehow  
I suspect that routing issues for a webserver or Rails app or whatever  
aren’t new problems, either.

If nothing shows up, or nothing really matches the problem, then, by all  
means, ask for help.

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)

~ Verbing weirds language.  
~ — Calvin.  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkgIlEoACgkQbtAgaoJTgL+WWgCfegtWjz+ea+0JzcA1zdois8qH  
xOEAnA6zt2Lyrt5qwKYFPWK0wwnJ5gvD  
=e0J8  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![skade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@skade](https://www.ruby-forum.com/u/skade)\
**Post date:** [April 18, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/re-redirecting-url/135144/5 "2008-04-18T15:09:16Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

> all  
> means, ask for help.

My point was: If you think that the question is a null statement,  
don’t add another  
null statement - at least try to improve the value of the thread.  
Maybe there is  
someone else that can make sense of it.

Regards,  
Florian G.

P.S.: But if you could give me teh codez for h3ll0 wurld, i’d be  
happy :).  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkgInUcACgkQJA/zY0IIRZZkBQCgnAlA3CyIm7ofG2f9hpyVqasg  
lAwAoJWbtdo5KQ/Ncqm0eE//2eu3BTfA  
=i1Ib  
-----END PGP SIGNATURE-----
