File-free extensions are usually the result of an abstraction of the URL path - this means that your application should interpret everything after the URL and start presenting data based on this.
Consider the following:
http://www.url.com/about-us
In a normal HTTP request (for example, Apache), Apache will try to serve the shared folder named /about-us
, and since it is not specified, the static file index.php
.
With any of the popular MVC frameworks such as CodeIgniter, CakePHP, Ruby on Rails, etc., /about-us
maps to what is called a route that loads the assets related to this page. Therefore, instead of loading a static page, it ends in the database, captures data for this page, captures a template, and dynamically serves the file. This, in fact, is one way to get "pretty" URLs.
If you want to knock over your own, I highly recommend any of the above infrastructures. Don't just use them without understanding them, try to understand what the execution process is. Get to know exactly what each request does.
As for authentication, I know that there are several options in Rails, such as Devise and CanCan. These are mostly pre-coded authentication modules that allow you to easily configure them.
source share