V
V
Vladimir Chernyshev2011-02-04 14:28:17
Nginx
Vladimir Chernyshev, 2011-02-04 14:28:17

nginx: /message.php?from=&to= -> /user/message/new/

Porting one PHP application under RoR. At first I wanted to rewrite everything from scratch, but they demand to introduce new features as soon as possible. I decided to do this: I am looking for php scripts related to a new feature, rewriting them under the rails (working with the same database), and implementing them. The rails are spinning under nginx+passenger. The task is to translate addresses from the php space (*.php?*) to RoR REST. I see two options:
- internal rewrite from php to ror for already ported scripts
- define location with passenger _enabled on for already ported scripts and rewrite the request already in a ruby ​​application (for example, middleware).

What would you do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VBart, 2011-02-05
@VolCh

"- internal rewrite from php to ror for already ported scripts"
For there is no need to shove crutches into the code. And at the nginx configuration level, it's quite tolerable. But it’s not clear why an internal rewrite, and not a normal full-fledged 301 redirect?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question