How to enable MultiViews in Apache
Sometimes, your URLs need to look something like http://hostname.com/list/popular, where popular is not a directory but a popular.php file inside the list directory and you don’t want to specify the file extensions. One reason for this could be that if you are only implementing the view of a web application that calls web services on an application server, the application server may have the URLs implemented that way, so you want to map the same URL paths and format.
Apache makes this easy with the MultiView option, which can be set within <!–[if gte mso 9]> Normal 0 false false false MicrosoftInternetExplorer4 <![endif]–><!–[if gte mso 9]> <![endif]–> <!–[endif]–><Directory>, <Location> or <Files> section in httpd.conf.
The format of the Options directive is:
Options [option 1] [option 2] … [option n]
So, to enable MultiView, you would set that with the Options directive. For example:
<!–[if gte mso 9]> Normal 0 false false false MicrosoftInternetExplorer4 <![endif]–><!–[if gte mso 9]> <![endif]–> <!–[endif]–>
<Directory "C:/xampp/htdocs"> #Other directives here... Options Indexes FollowSymLinks Includes MultiViews
<!–[if gte mso 9]> Normal 0 false false false MicrosoftInternetExplorer4 <![endif]–><!–[if gte mso 9]> <![endif]–> <!–[endif]–>
#Other directives here... </Directory">
Now, by having MultiViews as an option to the Options directive, I can just type http://hostname.com/list/popular, instead of http://hostname.com/list/popular.php
Like this:
Entry filed under: Distributed Systems, Uncategorized. Tags: apache, artan, direct, enable, file, ismaili, multi, multiviews, not, options, system, views.
Bash Keyboard Shortcuts CS 462 – Large-Scale Distributed System Design
Trackback this post