Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

Ruby On Rails .htaccess Redirection

tui shared this idea 8 years ago
Open Discussion

Hello,


The current Ruby On Rails redirection write a rule on .htaccess that redirect a some subdirectory text url (like domain.com/rubyapp/ or http://www.domain.com/rubyapp/) to the app port.


However this rule only works with a slash at the end of the subdirectory text "domain.com/rubyapp/" but it dont work if a visitor enter the url without the final slash "domain.com/rubyapp" if a visitor enter the url without the final slash he got a 404 not found error.


As nobody uses to write a final slash in the url, is likely that all the visitors get a 404 not found error on your app; in this case you (as a hosting provider or server manager) or the cpanel user account must manually modify .htaccess to allow the urls work with or without the final slash every time that he update, create or modify its ruby app.


I think that cPanel must update the current .htaccess rule in RoR redirection to allow the redirection with and without the final slash.

Leave a Comment
 
Attach a file