Hi together,
I have switched to Ruby on Rails and my current problem is to reroute
the old contents like XXX/dummy.html
or XXX/dummy.php
in RoR.
What exactly is the best solution for
- isolated content (
XXX/onlyinstance.html
) - content which has a internal structure like
XXX/dummy1.html
,XXX/dummy2.html
http://guides.rubyonrails.org/routing.html does not explain how to migrate old content.
Note: Changing the old links is NOT an option. The website is hosted, it is not my own server. As the domain hasn't changed, the solution to redirect it seems to be unnecessary...there should be a better solution.
EDIT: I have found out that the best solution is in fact rerouting it by the way weppos described.
So add a .htaccess file in the public directory and write
RewriteEngine on
Redirect permanent /XXX.php http://XYZ/XXX
For whatever reason, RoR did not accept rerouting in routes.rb...while .html/.xml all goes fine, .php does not function. I haven't found out why. Because weppos answer was the best, I will award him a 50 point bounty, but as the others answers are valid, too, I will upvote them. Thank you all