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 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 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, configure your web server to do the rewrite.
- then choose the following dokuwiki configuration:
- the htaccess rewrite Dokuwiki option.
- the useSlash option.
Example:
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 show page at different URL
Example: because this page has the nice:url 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:
- config%3Auserewrite - .htaccess (for nice URL)
- config%3Auseslash - Yes (for nice URL)