diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-16 19:26:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-16 19:26:03 +0200 |
commit | 81c9df1363116b0f70161ccf55af4d6aab8c7f6b (patch) | |
tree | 92f5b8c6d4efab2533033ebf4422b20c25f33dd6 /doc | |
parent | cd2878edeeb1f28356c486c73a12af827b2d9f93 (diff) | |
parent | 7836ed9b2e98e2c6898f011e431d3a58ebcfa3e5 (diff) | |
download | Shaarli-81c9df1363116b0f70161ccf55af4d6aab8c7f6b.tar.gz Shaarli-81c9df1363116b0f70161ccf55af4d6aab8c7f6b.tar.zst Shaarli-81c9df1363116b0f70161ccf55af4d6aab8c7f6b.zip |
Merge pull request #1593 from ArthurHoaro/fix/no-url-rewriting
Diffstat (limited to 'doc')
-rw-r--r-- | doc/md/Server-configuration.md | 16 | ||||
-rw-r--r-- | doc/md/dev/Plugin-system.md | 11 |
2 files changed, 24 insertions, 3 deletions
diff --git a/doc/md/Server-configuration.md b/doc/md/Server-configuration.md index 14070c8a..8cb39934 100644 --- a/doc/md/Server-configuration.md +++ b/doc/md/Server-configuration.md | |||
@@ -362,7 +362,23 @@ sudo systemctl reload nginx | |||
362 | 362 | ||
363 | If Shaarli is hosted on a server behind a [reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy) (i.e. there is a proxy server between clients and the web server hosting Shaarli), configure it accordingly. See [Reverse proxy](Reverse-proxy.md) configuration. | 363 | If Shaarli is hosted on a server behind a [reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy) (i.e. there is a proxy server between clients and the web server hosting Shaarli), configure it accordingly. See [Reverse proxy](Reverse-proxy.md) configuration. |
364 | 364 | ||
365 | ## Using Shaarli without URL rewriting | ||
365 | 366 | ||
367 | By default, Shaarli uses Slim framework's URL, which requires | ||
368 | URL rewriting. | ||
369 | |||
370 | If you can't use URL rewriting for any reason (not supported by | ||
371 | your web server, shared hosting, etc.), you *can* use Shaarli | ||
372 | without URL rewriting. | ||
373 | |||
374 | You just need to prefix your URL by `/index.php/`. | ||
375 | Example: instead of accessing `https://shaarli.mydomain.org/`, | ||
376 | use `https://shaarli.mydomain.org/index.php/`. | ||
377 | |||
378 | **Recommended:** | ||
379 | * after installation, in the configuration page, set your header link to `/index.php/`. | ||
380 | * in your configuration file `config.json.php` set `general.root_url` to | ||
381 | `https://shaarli.mydomain.org/index.php/`. | ||
366 | 382 | ||
367 | ## Allow import of large browser bookmarks export | 383 | ## Allow import of large browser bookmarks export |
368 | 384 | ||
diff --git a/doc/md/dev/Plugin-system.md b/doc/md/dev/Plugin-system.md index c29774de..f09fadc2 100644 --- a/doc/md/dev/Plugin-system.md +++ b/doc/md/dev/Plugin-system.md | |||
@@ -148,11 +148,16 @@ If a file needs to be included in server end, use simple relative path: | |||
148 | `PluginManager::$PLUGINS_PATH . '/mything/template.html'`. | 148 | `PluginManager::$PLUGINS_PATH . '/mything/template.html'`. |
149 | 149 | ||
150 | If it needs to be included in front end side (e.g. an image), | 150 | If it needs to be included in front end side (e.g. an image), |
151 | the relative path must be prefixed with special data `_BASE_PATH_`: | 151 | the relative path must be prefixed with special data: |
152 | `($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH . '/mything/picture.png`. | 152 | |
153 | * if it's a link that will need to be processed by Shaarli, use `_BASE_PATH_`: | ||
154 | for e.g. `$data['_BASE_PATH_'] . '/admin/tools`. | ||
155 | * if you want to include an asset, you need to add the root URL (base path without `/index.php`, for people using Shaarli without URL rewriting), then use `_ROOT_PATH_`: | ||
156 | for e.g | ||
157 | `$['_ROOT_PATH_'] . '/' . PluginManager::$PLUGINS_PATH . '/mything/picture.png`. | ||
153 | 158 | ||
154 | Note that special placeholders for CSS and JS files (respectively `css_files` and `js_files`) are already prefixed | 159 | Note that special placeholders for CSS and JS files (respectively `css_files` and `js_files`) are already prefixed |
155 | with the base path in template files. | 160 | with the root path in template files. |
156 | 161 | ||
157 | ### It's not working! | 162 | ### It's not working! |
158 | 163 | ||