Closed LPGhatguy closed 4 years ago
Chiming in to let you know I have identified the same issue, meaning this bug report also affects me.
Should be resolved in v1.0.1 released just now, thanks to the contribution from @prcr
@burkestar @prcr I have the same issue,and I am using 1.0.1.
plugins:
- redirects:
redirect_maps:
'app/Jupyterlab-With-GPU.md': 'app/Jupyterlab.md'
I want http://mydomain/help/app/Jupyterlab-With-GPU/
redirects to http://mydomain/help/app/Jupyterlab/
. But I got http://mydomain/app/Jupyterlab/
.
Is there some other configurations I need to do?
Hi @luweizheng, just to check, do you have the site_url
project settting defined (https://www.mkdocs.org/user-guide/configuration/#site_url)? The mkdocs-redirects plugin should now be using this setting to correctly determine the target URL of the redirect.
Hi @prcr I did not set site_url
before and after I set it, It works! Thank you so much for your suggestions.
for others who have the same problem, you must set site_url
correct, like this:
site_url: 'http://mydomain/help/'
plugins:
- redirects:
redirect_maps:
'app/a.md': 'app/b.md'
Then http://mydomain/help/app/a/
will redirect to http://mydomain/help/app/b/
.
My docs website lives at
https://rojo.space/docs
, a part of a larger website not managed by MkDocs.I have a redirect setup like this:
I'm expecting this to redirect from
https://rojo.space/docs/latest
tohttps://rojo.space/docs
, but it instead redirects tohttps://rojo.space
.I would expect mkdocs-redirects to use the
site_url
configuration value to know that my docs website is not at the root, and generate appropriate redirects. It is set tohttps://rojo.space/docs
for this site.