I've been wondering for a long time how people manage to get their URLs to work without file extentions such as '.html' or '.apsx' on the end.
Look at this website for 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 they accomplished this? The only method I can think of would be to create a new directory for each page and have an index page in each directory but this would be a huge hassle for a larger website. Is there any other way?
Thankyou
The three most common ways are to:
index.html
file in it).The latter approach would use something like this in an 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, that particular example was cribbed from a Perl application I'm writing) respectively.
The URL format would be handled by the script itself, and different frameworks take different approaches to the problem.
In Catalyst, this is done by providing attributes to subroutine names.
Dancer has its own route handler syntax.
Web::Simple uses subroutine prototypes.
Django uses a separate file containing a list of patterns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With