In short. Apache MultiViews can select a matching file variant for a missing path, so PrestaShop documents a control to disable it when friendly URLs misbehave.
Definition: Apache MultiViews is a content negotiation feature that can select a file variant when the requested path is missing. PrestaShop documents disabling it because this implicit language-based selection can interfere with friendly URLs, which depend on server URL rewriting.
Key facts
- PrestaShop says friendly URLs require a server that supports URL rewriting, such as Apache's
mod_rewrite, and that enabling them without that support can make the shop unavailable to customers. Its SEO and URLs documentation places this requirement before the URL settings. - In the same URL configuration, PrestaShop lists Disable Apache's MultiViews option and describes MultiViews as a system that serves the best matching language version under the same URL when enabled.
- Apache's mod_negotiation documentation says a Multiviews search performs an implicit filename pattern match and chooses among the results.
- Apache's Options directive documentation defines
MultiViewsas a content negotiation feature provided throughmod_negotiation.
Why can MultiViews affect a friendly URL?
PrestaShop's friendly URL changes a request from a query-string form such as product.php?id_product=27 to a path such as /2-music-players/27-ipod-nano-green. The store needs URL rewriting to route that readable path to the application. PrestaShop gives the Apache mod_rewrite feature as an example of the required server support.
Apache's documented MultiViews flow starts when a requested path does not exist. For a request for /some/dir/foo, Apache reads the directory for files named foo.*, assigns the variants the media types and content encodings they would have had if requested by name, then returns the best match for the client's requirements. A request intended for PrestaShop's rewritten route can therefore enter Apache's content selection step before the application handles the route. PrestaShop describes the resulting risk as trouble with the friendly URLs feature.
What does the Disable Apache's MultiViews option correspond to?
The Apache Options directive controls server features available in a directory. Its syntax accepts a plus or minus before an option, and its documented context includes server configuration, virtual hosts, directories, and .htaccess files. The configuration form for removing MultiViews from a directory is:
Options -MultiViews
Apache lists MultiViews as an option that permits content-negotiated selection through mod_negotiation. The same page says that Options All includes every option except MultiViews, and that the Options override class is required when the directive is supplied through .htaccess. The exact place where this line can be used depends on the server configuration and the permissions granted to the directory.
PrestaShop exposes the setting in its URL configuration. Its wording is conditional: when MultiViews causes trouble for friendly URLs, you can try disabling it with this option. The documentation does not state that every PrestaShop installation needs the option.
How should you check the setting on a store?
First check that Friendly URL is enabled only when the server supports URL rewriting. PrestaShop says to leave that setting at No when the server cannot support URL rewriting. The page also describes a message saying that mod_rewrite is not active or that the server configuration cannot be checked, and tells the administrator to test the feature when detection is unavailable.
Next request a representative product or category URL that uses the store's rewritten route. PrestaShop's default product route is {category:/}{id}-{rewrite}{-:ean13}.html, with /summer-dresses/7-printed-chiffon-dress.html as its example output. If the rewritten route behaves incorrectly while Apache MultiViews is enabled, review whether the directory permits the Options directive and test the Disable Apache's MultiViews option. Apache documents that MultiViews operates by comparing real resources in the directory, so a hosting provider may need to change the server or directory configuration.
Related terms
- How do I enable friendly URLs in PrestaShop?
- How do I edit URL route patterns in PrestaShop?
- How do I configure canonical redirects in PrestaShop?
FAQ
Is MultiViews the same as mod_rewrite?
They are separate Apache features. PrestaShop associates friendly URLs with URL rewriting through mod_rewrite, while Apache documents MultiViews as content negotiation provided by mod_negotiation.
Should every PrestaShop store disable MultiViews?
PrestaShop presents the control for the case where MultiViews brings trouble to friendly URLs. The documentation says to try disabling it in that case, so the setting is a troubleshooting control rather than a universal requirement.
What should I do when PrestaShop cannot detect URL rewriting?
PrestaShop says the server configuration can be impossible for the application to check. Test a friendly URL yourself and ask the hosting provider whether the server supports URL rewriting when the result is unclear.
Sources
- PrestaShop User Documentation, "SEO and URLs", undated
- Apache HTTP Server, "mod_negotiation", undated
- Apache HTTP Server, "core: Options Directive", undated
Check how a page reads to answer engines. Open the GEO score analyzer