---json { "aliases": [ { "path": ":docs:url:nice" } ], "canonical": ":nice:url", "description": "This article shows you how to configure your installation to show nice url to your users.", "name": "Nice URL", "page_id": "oln5keoyf6cfrswut2clz", "slug": ":nice-url" } --- ====== How to configure nice URL? ====== This is an informative page about nice URL ===== What is a nice URL ? ===== By default, ''URL'' in Dokuwiki looks like that: * for a [[..:page:url|page]]: https://combostrap.com/doku.php?id=url:nice * for a media (image, ...): https://combostrap.com/lib/exe/fetch.php?media=image.png These URLs have technical information: * the name of the script ''doku.php'' or ''lib/exe/fetch.php'' * the property key ''id'' or ''media'' They can be stripped off to let them be more readable for the human but also for the [[:docs:seo:seo|search bot]] The resulting ''nice urls'' would become: * for a page: https://combostrap.com/url/nice * for a media: https://combostrap.com/_media/image.jpg ===== How to get a Nice URL? ===== You should: * first, [[doku>rewrite#option_1web_server|configure your web server]] to do the rewrite. * then choose the following [[:docs:app:configuration|dokuwiki configuration]]: * the ''htaccess'' [[doku>rewrite|rewrite Dokuwiki]] option. * the [[doku>useslash|useSlash]] option. Example: {{:docs:admin:nice-url-parameters.jpg|}} \\ \\ ''htaccess'' is a misleading option name as it just means that the web server is configured to do the rewrite. You can configure any webserver, not only Apache. We personally use Nginx and Caddy. ===== What Combostrap can do with URL? ===== ''ComboStrap'' can't rewrite the URL to use the script ''doku.php'' as it depends on it. But Combostrap can [[docs:router:transparent|show page at different URL]] **Example:** because this page has the ''nice:url'' [[docs:page:canonical|canonical value]], the page is also available at: https://combostrap.com/nice/url ===== Important Configuration ===== The Dokuwiki Configuration that are important to get nice URL are the following one: * [[doku>config:userewrite]] - ''.htaccess'' (for nice URL) * [[doku>config:useslash]] - Yes (for nice URL)