Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8505259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:16:04+00:00 2026-06-11T02:16:04+00:00

I know rails uses the controller action style urls like www.myapp.com/home/index for example I

  • 0

I know rails uses the controller action style urls like www.myapp.com/home/index for example

I would like to have a url like this on my rails app, www.myapp.com/my_page_here is this possible and if so how would I go about this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:16:06+00:00Added an answer on June 11, 2026 at 2:16 am

    You just use a get outside of any resources or namespace block in your routes.rb file:

    get 'my_page_here ', :to => 'home#index'
    

    Assuming you are using Rails 3+, do NOT use match. It can be dangerous, because if a page accepts data from a form, it should take POST requests. match would allow GET requests on an action with side-effects – which is NOT good.

    Always use get, put, post or these variants where possible.

    To get a path helper, try:

    get 'my_page_here ', :to => 'home#index', :as => :my_page
    

    That way, in your views, my_page_path will equal http://{domain}/my_page_here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know Github.com uses Rails. But what template language does Github use? And what
I am creating a Rails App (I'd like to know how to do this
I'm on Rails 2.3.5. In a typical user controller create action class UsersController def
I am using Ruby on Rails 3 and I would know in which case
I am using Ruby on Rails 3 and I would like to update an
I have this rails Application which uses salesforce App. I want to know if
Does anybody know if youtube uses Django, Rails or some other framework? I googled,
My rails app uses sendgrid to send emails. I wanted to know if there
I know rails uses the default application.html.erb. I have a profile and on my
I have a rails app that uses heavily js (over 1MB total). I'd like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.