Reputation: 25338
Somehow Google has indexed the wrong URL. No idea how, but alas, here we are.
I need to forward all URLs with this setup...
example.com/features.reports
to example.com/features/reports
The constant here is the domain and "features"...basically anything with features.
should forward to features/
How can I set that up in routes?
Upvotes: 0
Views: 108
Reputation: 15276
Try this:
match "/features.*path" => redirect("/features/%{path}")
This will return a 301 permanently moved redirect.
See Rails Guides for more info on redirect and globbing.
Upvotes: 2