html - How to get user friendly URLs without any file extensions? -


i've been wondering long time how people manage urls work without file extentions such '.html' or '.apsx' on end.

look @ website example:

http://www.axongarside.com/communication http://www.axongarside.com/communication/compleat http://www.axongarside.com/brand http://www.axongarside.com/brand/k3-group 

how have accomplished this? method can think of create new directory each page , have index page in each directory huge hassle larger website. there other way?

thankyou

the 3 common ways to:

  • use index pages (i.e. create directory , put index.html file in it).
  • use rewrite engine (such apache's mod_rewrite) map urls onto different files (this common approach in php-land).
  • use front controller script processes urls (this usual approach mvc frameworks).

the latter approach use in apache server configuration:

wsgidaemonprocess example processes=2 threads=15 display-name=%{group} wsgiprocessgroup example wsgiscriptalias / /hosts/example.com/application/wsgi.py 

or

sethandler fcgid-script alias / /hosts/example/application.fcgi/ 

for scripts using wsgi (python) or fastcgi (cross-language, particular example cribbed perl application i'm writing) respectively.

the url format handled script itself, , different frameworks take different approaches problem.

in catalyst, done providing attributes subroutine names.

dancer has own route handler syntax.

web::simple uses subroutine prototypes.

django uses a separate file containing list of patterns.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -